From 7fa91ec175452823e04dba199bc48df12d3a64f0 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sun, 14 Dec 2014 15:31:49 +0100 Subject: lib/nfs/Connection: add debug flag "in_destroy" --- src/lib/nfs/Connection.cxx | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/lib/nfs/Connection.cxx') diff --git a/src/lib/nfs/Connection.cxx b/src/lib/nfs/Connection.cxx index 56abf7129..4b6a6fc78 100644 --- a/src/lib/nfs/Connection.cxx +++ b/src/lib/nfs/Connection.cxx @@ -374,6 +374,11 @@ NfsConnection::DestroyContext() assert(GetEventLoop().IsInside()); assert(context != nullptr); +#ifndef NDEBUG + assert(!in_destroy); + in_destroy = true; +#endif + /* cancel pending DeferredMonitor that was scheduled to notify new leases */ DeferredMonitor::Cancel(); @@ -558,6 +563,7 @@ NfsConnection::MountInternal(Error &error) #ifndef NDEBUG in_service = false; in_event = false; + in_destroy = false; #endif if (nfs_mount_async(context, server.c_str(), export_name.c_str(), -- cgit v1.2.3