* If an error is notified, also forward the even to read/write.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37713 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2006-2009, Haiku, Inc. All Rights Reserved.
|
* Copyright 2006-2010, Haiku, Inc. All Rights Reserved.
|
||||||
* Distributed under the terms of the MIT License.
|
* Distributed under the terms of the MIT License.
|
||||||
*
|
*
|
||||||
* Authors:
|
* Authors:
|
||||||
@@ -902,7 +902,8 @@ socket_notify(net_socket* _socket, uint8 event, int32 value)
|
|||||||
|
|
||||||
switch (event) {
|
switch (event) {
|
||||||
case B_SELECT_READ:
|
case B_SELECT_READ:
|
||||||
if ((ssize_t)socket->receive.low_water_mark > value && value >= B_OK)
|
if ((ssize_t)socket->receive.low_water_mark > value
|
||||||
|
&& value >= B_OK)
|
||||||
notify = false;
|
notify = false;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -913,12 +914,13 @@ 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)
|
if (notify && socket->select_pool != NULL)
|
||||||
notify_select_event_pool(socket->select_pool, event);
|
notify_select_event_pool(socket->select_pool, event);
|
||||||
|
|
||||||
return B_OK;
|
return B_OK;
|
||||||
|
|||||||
Reference in New Issue
Block a user