* B_SELECT_{READ|WRITE|ERROR} are no flags fields, so they cannot be or'ed.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37834 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
bb69cd6548
commit
845a29a054
@ -914,15 +914,21 @@ socket_notify(net_socket* _socket, uint8 event, int32 value)
|
||||
|
||||
case B_SELECT_ERROR:
|
||||
socket->error = value;
|
||||
event |= B_SELECT_READ | B_SELECT_WRITE;
|
||||
break;
|
||||
}
|
||||
|
||||
MutexLocker _(socket->lock);
|
||||
|
||||
if (notify && socket->select_pool != NULL)
|
||||
if (notify && socket->select_pool != NULL) {
|
||||
notify_select_event_pool(socket->select_pool, event);
|
||||
|
||||
if (event == B_SELECT_ERROR) {
|
||||
// always notify read/write on error
|
||||
notify_select_event_pool(socket->select_pool, B_SELECT_READ);
|
||||
notify_select_event_pool(socket->select_pool, B_SELECT_WRITE);
|
||||
}
|
||||
}
|
||||
|
||||
return B_OK;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user