diff --git a/src/lib/nfs/Connection.cxx b/src/lib/nfs/Connection.cxx index db23ec1fb..41feebc74 100644 --- a/src/lib/nfs/Connection.cxx +++ b/src/lib/nfs/Connection.cxx @@ -382,11 +382,6 @@ NfsConnection::PrepareDestroyContext() noexcept { assert(GetEventLoop().IsInside()); -#ifndef NDEBUG - assert(!in_destroy); - in_destroy = true; -#endif - if (mount_state == MountState::WAITING) { assert(mount_timeout_event.IsPending()); mount_timeout_event.Cancel(); @@ -403,11 +398,6 @@ NfsConnection::PrepareDestroyContext() noexcept callbacks.ForEach([](CancellableCallback &c){ c.PrepareDestroyContext(); }); - -#ifndef NDEBUG - assert(in_destroy); - in_destroy = false; -#endif } inline void @@ -552,7 +542,6 @@ NfsConnection::MountCallback(int status, [[maybe_unused]] nfs_context *nfs, mount_state = MountState::FINISHED; - assert(mount_timeout_event.IsPending() || in_destroy); mount_timeout_event.Cancel(); if (status < 0) { diff --git a/src/lib/nfs/Connection.hxx b/src/lib/nfs/Connection.hxx index de904c3a5..66579e772 100644 --- a/src/lib/nfs/Connection.hxx +++ b/src/lib/nfs/Connection.hxx @@ -118,11 +118,6 @@ class NfsConnection { * event updates are omitted. */ bool in_event = false; - - /** - * True when DestroyContext() is being called. - */ - bool in_destroy = false; #endif public: