aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/nfs
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/nfs')
-rw-r--r--src/lib/nfs/Connection.cxx3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/lib/nfs/Connection.cxx b/src/lib/nfs/Connection.cxx
index e3dac5c81..9bcb241c2 100644
--- a/src/lib/nfs/Connection.cxx
+++ b/src/lib/nfs/Connection.cxx
@@ -237,6 +237,9 @@ NfsConnection::ScheduleSocket()
if (!SocketMonitor::IsDefined()) {
int _fd = nfs_get_fd(context);
+ if (_fd < 0)
+ return;
+
fd_set_cloexec(_fd, true);
SocketMonitor::Open(_fd);
}