diff --git a/src/net/SocketDescriptor.cxx b/src/net/SocketDescriptor.cxx index bc914ae93..146149af0 100644 --- a/src/net/SocketDescriptor.cxx +++ b/src/net/SocketDescriptor.cxx @@ -77,6 +77,8 @@ SocketDescriptor::AcceptNonBlock(StaticSocketAddress &address) const SOCK_CLOEXEC|SOCK_NONBLOCK); #else int connection_fd = ::accept(Get(), address, &address.size); + if (connection_fd >= 0) + SocketDescriptor(connection_fd).SetNonBlocking(); #endif return SocketDescriptor(connection_fd); }