diff options
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/nfs/Connection.cxx | 3 |
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); } |