From: Andrey Volk Date: Thu, 9 Jul 2020 19:06:47 +0000 (+0400) Subject: [mod_verto] Fix use of libks websockets on Windows. POLLHUP is ignored in poll events... X-Git-Tag: v1.10.7^2~102 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5331850fc0659148d7e83005a6629d5b30884729;p=thirdparty%2Ffreeswitch.git [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. --- 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); }