1
0
Fork 0
mirror of https://github.com/warmcat/libwebsockets.git synced 2025-03-09 00:00:04 +01:00

test-server-extpoll: check for forced service before looping again

Signed-off-by: Denis Osvald <denis.osvald@sartura.hr>
This commit is contained in:
Denis Osvald 2016-10-07 10:57:02 +02:00 committed by Andy Green
parent 73557509bd
commit 3f8082fecf

View file

@ -439,7 +439,7 @@ int main(int argc, char **argv)
if (n < 0)
continue;
if (n)
if (n) {
for (n = 0; n < count_pollfds; n++)
if (pollfds[n].revents)
/*
@ -450,6 +450,13 @@ int main(int argc, char **argv)
if (lws_service_fd(context,
&pollfds[n]) < 0)
goto done;
/* if needed, force-service wsis that may not have read all input */
while (!lws_service_adjust_timeout(context, 1, 0)) {
lwsl_notice("extpoll doing forced service!\n");
lws_plat_service_tsi(context, -1, 0);
}
}
#else
/*
* If libwebsockets sockets are all we care about,