diff options
author | Max Kellermann <max@duempel.org> | 2014-11-26 20:19:17 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2014-11-26 20:19:17 +0100 |
commit | 737a56a0302b1030e1071c7be9add7bdca955e32 (patch) | |
tree | 93d9b6d625fa1b0ce9e8bf8d13fbc829be5178d1 /src/lib/nfs/Connection.cxx | |
parent | 12b6959ea201fea925c4376f961b8d54738292e2 (diff) | |
parent | 67cba251c8826409c82fb2ab75072dc4fca2b4dc (diff) | |
download | mpd-737a56a0302b1030e1071c7be9add7bdca955e32.tar.gz mpd-737a56a0302b1030e1071c7be9add7bdca955e32.tar.xz mpd-737a56a0302b1030e1071c7be9add7bdca955e32.zip |
Merge tag 'v0.19.5'
Diffstat (limited to 'src/lib/nfs/Connection.cxx')
-rw-r--r-- | src/lib/nfs/Connection.cxx | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/lib/nfs/Connection.cxx b/src/lib/nfs/Connection.cxx index c2c7ceb2b..06d2a4d2a 100644 --- a/src/lib/nfs/Connection.cxx +++ b/src/lib/nfs/Connection.cxx @@ -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(); @@ -405,10 +409,10 @@ NfsConnection::OnSocketReady(unsigned flags) error.Format(nfs_domain, "NFS connection has failed: %s", nfs_get_error(context)); + BroadcastError(std::move(error)); + DestroyContext(); closed = true; - - BroadcastError(std::move(error)); } else if (SocketMonitor::IsDefined() && nfs_get_fd(context) < 0) { /* this happens when rpc_reconnect_requeue() is called after the connection broke, but autoreconnet was @@ -421,10 +425,10 @@ NfsConnection::OnSocketReady(unsigned flags) error.Format(nfs_domain, "NFS socket disappeared: %s", msg); + BroadcastError(std::move(error)); + DestroyContext(); closed = true; - - BroadcastError(std::move(error)); } assert(in_event); |