mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-16 00:00:07 +01:00
windows eliminate duplicate POLLOUT
After "hotcookie" on github https://github.com/warmcat/libwebsockets/issues/345 Signed-off-by: Andy Green <andy.green@linaro.org>
This commit is contained in:
parent
0779964ec1
commit
d55ac45c39
1 changed files with 5 additions and 1 deletions
|
@ -355,6 +355,7 @@ LWS_VISIBLE void
|
|||
lws_plat_insert_socket_into_fds(struct libwebsocket_context *context,
|
||||
struct libwebsocket *wsi)
|
||||
{
|
||||
context->fds[context->fds_count].events = 0;
|
||||
context->fds[context->fds_count++].revents = 0;
|
||||
context->events[context->fds_count] = WSACreateEvent();
|
||||
WSAEventSelect(wsi->sock, context->events[context->fds_count], LWS_POLLIN);
|
||||
|
@ -377,10 +378,13 @@ LWS_VISIBLE int
|
|||
lws_plat_change_pollfd(struct libwebsocket_context *context,
|
||||
struct libwebsocket *wsi, struct libwebsocket_pollfd *pfd)
|
||||
{
|
||||
long networkevents = LWS_POLLOUT | LWS_POLLHUP;
|
||||
long networkevents = LWS_POLLHUP;
|
||||
|
||||
if ((pfd->events & LWS_POLLIN))
|
||||
networkevents |= LWS_POLLIN;
|
||||
|
||||
if ((pfd->events & LWS_POLLOUT))
|
||||
networkevents |= LWS_POLLOUT;
|
||||
|
||||
if (WSAEventSelect(wsi->sock,
|
||||
context->events[wsi->position_in_fds_table + 1],
|
||||
|
|
Loading…
Add table
Reference in a new issue