mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-16 00:00:07 +01:00
windows: fix timeout between writes on Windows
After servicing a writable socket, we need to set timeout_ms to zero. This makes WSAWaitForMultipleEvents() return immediately after checking events.
This commit is contained in:
parent
248826d7fc
commit
2cddfc963b
1 changed files with 4 additions and 0 deletions
|
@ -90,6 +90,10 @@ _lws_plat_service_tsi(struct lws_context *context, int timeout_ms, int tsi)
|
||||||
n = lws_service_fd(context, pfd);
|
n = lws_service_fd(context, pfd);
|
||||||
if (n < 0)
|
if (n < 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
|
/* Force WSAWaitForMultipleEvents() to check events and then return immediately. */
|
||||||
|
timeout_ms = 0;
|
||||||
|
|
||||||
/* if something closed, retry this slot */
|
/* if something closed, retry this slot */
|
||||||
if (n)
|
if (n)
|
||||||
i--;
|
i--;
|
||||||
|
|
Loading…
Add table
Reference in a new issue