lib/nfs/Connection: cancel DeferredMonitor on disconnect

Fixes potential second mount attempt after the old connection to the
NFS server was shut down.
This commit is contained in:
Max Kellermann 2014-11-25 13:09:19 +01:00
parent 029555d192
commit f5f43db2da

View File

@ -327,6 +327,10 @@ NfsConnection::DestroyContext()
assert(GetEventLoop().IsInside());
assert(context != nullptr);
/* cancel pending DeferredMonitor that was scheduled to notify
new leases */
DeferredMonitor::Cancel();
if (SocketMonitor::IsDefined())
SocketMonitor::Cancel();