net/SocketDescriptor: AcceptNonBlock() enables non-blocking even if SOCK_NONBLOCK is unavailable
This commit is contained in:
parent
e38c213ee0
commit
b234f4307f
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user