anevilyak+mmlr:
accept() is supposed to return B_WOULD_BLOCK when SO_NONBLOCK is set. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35154 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
3632eeedb9
commit
2416d6ae42
@ -673,8 +673,12 @@ TCPEndpoint::Accept(struct net_socket** _acceptedSocket)
|
||||
|
||||
status = acquire_sem_etc(fAcceptSemaphore, 1, B_ABSOLUTE_TIMEOUT
|
||||
| B_CAN_INTERRUPT, timeout);
|
||||
if (status != B_OK)
|
||||
if (status != B_OK) {
|
||||
if (status == B_TIMED_OUT && socket->receive.timeout == 0)
|
||||
return B_WOULD_BLOCK;
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
locker.Lock();
|
||||
status = gSocketModule->dequeue_connected(socket, _acceptedSocket);
|
||||
|
Loading…
Reference in New Issue
Block a user