mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-09 00:00:04 +01:00
bsd: POLLHUP always bound to POLLIN
On OSX, POLLHUP is always |POLLIN, even if you did not wait on POLLIN. This causes a loop because we don't want to ack the POLLHUP until we cleared any pollin (but there is no pending POLLIN...)
This commit is contained in:
parent
3eeda84a8d
commit
2fea1e49bd
1 changed files with 4 additions and 0 deletions
|
@ -729,6 +729,10 @@ rops_handle_POLLIN_h1(struct lws_context_per_thread *pt, struct lws *wsi,
|
|||
return LWS_HPI_RET_WSI_ALREADY_DIED;
|
||||
#endif
|
||||
|
||||
if (lwsi_state(wsi) == LRS_WAITING_CONNECT &&
|
||||
(pollfd->revents & LWS_POLLHUP))
|
||||
return LWS_HPI_RET_PLEASE_CLOSE_ME;
|
||||
|
||||
return LWS_HPI_RET_HANDLED;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue