client: close without spinning

https://github.com/warmcat/libwebsockets/issues/789
This commit is contained in:
Andy Green 2017-02-14 09:26:53 +08:00
parent 2e11efa84b
commit 1d393aba9e

View file

@ -830,6 +830,8 @@ lws_service_fd_tsi(struct lws_context *context, struct lws_pollfd *pollfd, int t
#endif
lwsl_debug("fd=%d, revents=%d\n", pollfd->fd, pollfd->revents);
if (pollfd->revents & LWS_POLLHUP)
goto close_and_handled;
/* okay, what we came here to do... */