aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/fd_util.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/fd_util.c b/src/fd_util.c
index bb03dbcb2..8f142e34a 100644
--- a/src/fd_util.c
+++ b/src/fd_util.c
@@ -180,8 +180,10 @@ socket_cloexec_nonblock(int domain, int type, int protocol)
#endif
fd = socket(domain, type, protocol);
- if (fd >= 0)
+ if (fd >= 0) {
fd_set_cloexec(fd, true);
+ fd_set_nonblock(fd);
+ }
return fd;
}