close also enable pollout processing for post send close state

This should solve the 100% cpu at close problem reported by Bruce Perens

Signed-off-by: Andy Green <andy.green@linaro.org>
This commit is contained in:
Andy Green 2015-04-26 06:09:13 +08:00
parent 82eccf7611
commit 4bca6cd367

View file

@ -499,6 +499,7 @@ libwebsocket_service_fd(struct libwebsocket_context *context,
(wsi->state == WSI_STATE_ESTABLISHED ||
wsi->state == WSI_STATE_HTTP2_ESTABLISHED ||
wsi->state == WSI_STATE_HTTP2_ESTABLISHED_PRE_SETTINGS ||
wsi->state == WSI_STATE_RETURNED_CLOSE_ALREADY ||
wsi->state == WSI_STATE_FLUSHING_STORED_SEND_BEFORE_CLOSE) &&
lws_handle_POLLOUT_event(context, wsi, pollfd)) {
lwsl_info("libwebsocket_service_fd: closing\n");