In set_socket_event, the event should be signaled if there's a pending
network event corresponding to the events the application wanted to be notified.
This commit is contained in:
parent
2caee712a2
commit
56adb25f7d
|
@ -461,6 +461,14 @@ DECL_HANDLER(set_socket_event)
|
||||||
sock_reselect( sock );
|
sock_reselect( sock );
|
||||||
if (sock->mask)
|
if (sock->mask)
|
||||||
sock->state |= WS_FD_NONBLOCKING;
|
sock->state |= WS_FD_NONBLOCKING;
|
||||||
|
|
||||||
|
/* if a network event is pending, signal the event object
|
||||||
|
it is possible that FD_CONNECT or FD_ACCEPT network events has happened
|
||||||
|
before a WSAEventSelect() was done on it.
|
||||||
|
(when dealing with Asynchronous socket) */
|
||||||
|
if (sock->pmask & sock->mask)
|
||||||
|
set_event(sock->event);
|
||||||
|
|
||||||
if (oevent)
|
if (oevent)
|
||||||
{
|
{
|
||||||
if ((oevent != sock->event) && (omask & WS_FD_SERVEVENT))
|
if ((oevent != sock->event) && (omask & WS_FD_SERVEVENT))
|
||||||
|
|
Loading…
Reference in New Issue