1
0
Fork 0
mirror of https://github.com/warmcat/libwebsockets.git synced 2025-03-09 00:00:04 +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:
Frank May 2018-08-19 06:43:31 +08:00 committed by Andy Green
parent 248826d7fc
commit 2cddfc963b

View file

@ -90,6 +90,10 @@ _lws_plat_service_tsi(struct lws_context *context, int timeout_ms, int tsi)
n = lws_service_fd(context, pfd);
if (n < 0)
return -1;
/* Force WSAWaitForMultipleEvents() to check events and then return immediately. */
timeout_ms = 0;
/* if something closed, retry this slot */
if (n)
i--;