[mod_verto] Fix use of libks websockets on Windows. POLLHUP is ignored in poll events on Linux but fails on Windows so should be avoided.

This commit is contained in:
Andrey Volk 2020-07-09 23:06:47 +04:00
parent f8150ead2c
commit 5331850fc0
1 changed files with 2 additions and 2 deletions

View File

@ -1865,7 +1865,7 @@ done:
kws_t *wsh = jsock->ws;
while(jsock->profile->running) {
int pflags = kws_wait_sock(wsh, 3000, KS_POLL_READ | KS_POLL_ERROR | KS_POLL_HUP);
int pflags = kws_wait_sock(wsh, 3000, KS_POLL_READ);
if (jsock->drop) { die("%s Dropping Connection\n", jsock->name); }
if (pflags < 0 && (errno != EINTR)) { die_errnof("%s POLL FAILED with %d", jsock->name, pflags); }
@ -1927,7 +1927,7 @@ static void client_run(jsock_t *jsock)
if (!jsock->ws) { die("%s Setup Error\n", jsock->name); }
pflags = kws_wait_sock(jsock->ws, poll_time, KS_POLL_READ | KS_POLL_ERROR | KS_POLL_HUP);
pflags = kws_wait_sock(jsock->ws, poll_time, KS_POLL_READ);
if (jsock->drop) { die("%s Dropping Connection\n", jsock->name); }
if (pflags < 0 && (errno != EINTR)) { die_errnof("%s POLL FAILED with %d", jsock->name, pflags); }