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:
parent
73557509bd
commit
3f8082fecf
1 changed files with 8 additions and 1 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Reference in a new issue