Commit b234f430 authored by Max Kellermann's avatar Max Kellermann

net/SocketDescriptor: AcceptNonBlock() enables non-blocking even if SOCK_NONBLOCK is unavailable

parent e38c213e
......@@ -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);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment