mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-09 00:00:04 +01:00
adopt: rejection should not loop with listen adoption
This commit is contained in:
parent
baccd5b238
commit
3ca8625129
1 changed files with 5 additions and 2 deletions
|
@ -43,6 +43,8 @@ _lws_plat_service_forced_tsi(struct lws_context *context, int tsi)
|
|||
|
||||
/* any socket with events to service? */
|
||||
for (n = 0; n < (int)pt->fds_count; n++) {
|
||||
lws_sockfd_type fd = pt->fds[n].fd;
|
||||
|
||||
if (!pt->fds[n].revents)
|
||||
continue;
|
||||
|
||||
|
@ -52,8 +54,9 @@ _lws_plat_service_forced_tsi(struct lws_context *context, int tsi)
|
|||
__func__, m);
|
||||
return -1;
|
||||
}
|
||||
/* if something closed, retry this slot */
|
||||
if (m)
|
||||
/* if something closed, retry this slot since may have been
|
||||
* swapped with end fd */
|
||||
if (m && pt->fds[n].fd != fd)
|
||||
n--;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue