Skip to content
Snippets Groups Projects
Commit 2cddfc96 authored by Frank May's avatar Frank May Committed by Andy Green
Browse files

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.
parent 248826d7
No related branches found
No related tags found
No related merge requests found
...@@ -90,6 +90,10 @@ _lws_plat_service_tsi(struct lws_context *context, int timeout_ms, int tsi) ...@@ -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--;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment