1
0
Fork 0
mirror of https://github.com/warmcat/libwebsockets.git synced 2025-03-16 00:00:07 +01:00

close actually close after send close ack

Signed-off-by: Andy Green <andy.green@linaro.org>
This commit is contained in:
Andy Green 2015-11-15 10:28:45 +08:00
parent 974bed41b8
commit 649f602a18

View file

@ -512,6 +512,8 @@ libwebsocket_service_fd(struct libwebsocket_context *context,
wsi->state == WSI_STATE_RETURNED_CLOSE_ALREADY ||
wsi->state == WSI_STATE_FLUSHING_STORED_SEND_BEFORE_CLOSE) &&
lws_handle_POLLOUT_event(context, wsi, pollfd)) {
if (wsi->state == WSI_STATE_RETURNED_CLOSE_ALREADY)
wsi->state = WSI_STATE_FLUSHING_STORED_SEND_BEFORE_CLOSE;
lwsl_info("libwebsocket_service_fd: closing\n");
goto close_and_handled;
}