From 5331850fc0659148d7e83005a6629d5b30884729 Mon Sep 17 00:00:00 2001 From: Andrey Volk Date: Thu, 9 Jul 2020 23:06:47 +0400 Subject: [PATCH] [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. --- src/mod/endpoints/mod_verto/mod_verto.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mod/endpoints/mod_verto/mod_verto.c b/src/mod/endpoints/mod_verto/mod_verto.c index b5dcce2269..804f612ff0 100644 --- a/src/mod/endpoints/mod_verto/mod_verto.c +++ b/src/mod/endpoints/mod_verto/mod_verto.c @@ -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); }