aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/lib/nfs/Connection.cxx10
-rw-r--r--src/lib/nfs/Connection.hxx10
2 files changed, 2 insertions, 18 deletions
diff --git a/src/lib/nfs/Connection.cxx b/src/lib/nfs/Connection.cxx
index 934cf0a49..cd6f1e2ef 100644
--- a/src/lib/nfs/Connection.cxx
+++ b/src/lib/nfs/Connection.cxx
@@ -263,7 +263,6 @@ NfsConnection::OnSocketReady(unsigned flags)
assert(!in_service);
in_service = true;
- postponed_destroy = false;
int result = nfs_service(context, events_to_libnfs(flags));
@@ -271,14 +270,7 @@ NfsConnection::OnSocketReady(unsigned flags)
assert(in_service);
in_service = false;
- if (postponed_destroy) {
- /* somebody has called nfs_client_free() while we were inside
- nfs_service() */
- const ScopeLock protect(mutex);
- DestroyContext();
- closed = true;
- // TODO? nfs_client_cleanup_files(client);
- } else if (!was_mounted && mount_finished) {
+ if (!was_mounted && mount_finished) {
const ScopeLock protect(mutex);
if (postponed_mount_error.IsDefined()) {
diff --git a/src/lib/nfs/Connection.hxx b/src/lib/nfs/Connection.hxx
index 8a66b9977..4b570513e 100644
--- a/src/lib/nfs/Connection.hxx
+++ b/src/lib/nfs/Connection.hxx
@@ -75,9 +75,7 @@ class NfsConnection : SocketMonitor, DeferredMonitor {
Error postponed_mount_error;
/**
- * True when nfs_service() is being called. During that,
- * nfs_client_free() is postponed, or libnfs will crash. See
- * #postponed_destroy.
+ * True when nfs_service() is being called.
*/
bool in_service;
@@ -87,12 +85,6 @@ class NfsConnection : SocketMonitor, DeferredMonitor {
*/
bool in_event;
- /**
- * True when nfs_client_free() has been called while #in_service
- * was true.
- */
- bool postponed_destroy;
-
bool mount_finished;
public: