From 8707aafaf70b4620d010633ce7e677d2a4a9247b Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sun, 31 Aug 2014 17:39:33 +0200 Subject: nfs/Connection: fix assertion failure --- src/lib/nfs/Connection.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/lib/nfs/Connection.cxx') diff --git a/src/lib/nfs/Connection.cxx b/src/lib/nfs/Connection.cxx index a2f0cbb45..a99b845b9 100644 --- a/src/lib/nfs/Connection.cxx +++ b/src/lib/nfs/Connection.cxx @@ -223,7 +223,9 @@ NfsConnection::DestroyContext() { assert(context != nullptr); - SocketMonitor::Cancel(); + if (SocketMonitor::IsDefined()) + SocketMonitor::Cancel(); + nfs_destroy_context(context); context = nullptr; } -- cgit v1.2.3