* 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:
@@ -914,15 +914,21 @@ socket_notify(net_socket* _socket, uint8 event, int32 value)
|
|||||||
|
|
||||||
case B_SELECT_ERROR:
|
case B_SELECT_ERROR:
|
||||||
socket->error = value;
|
socket->error = value;
|
||||||
event |= B_SELECT_READ | B_SELECT_WRITE;
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
MutexLocker _(socket->lock);
|
MutexLocker _(socket->lock);
|
||||||
|
|
||||||
if (notify && socket->select_pool != NULL)
|
if (notify && socket->select_pool != NULL) {
|
||||||
notify_select_event_pool(socket->select_pool, event);
|
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;
|
return B_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user