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

attempt to get correct close flow banning writeable cb when closing

Signed-off-by: Andy Green <andy.green@linaro.org>
This commit is contained in:
Andy Green 2015-10-16 11:07:52 +08:00
parent f7e2a85e11
commit 2488c46c9b

View file

@ -117,6 +117,11 @@ lws_handle_POLLOUT_event(struct libwebsocket_context *context,
return 0;
}
/* if we are closing, don't confuse the user with writeable cb */
if (wsi->state == WSI_STATE_RETURNED_CLOSE_ALREADY)
goto user_service;
/* if nothing critical, user can get the callback */
m = lws_ext_callback_for_each_active(wsi, LWS_EXT_CALLBACK_IS_WRITEABLE,
@ -205,9 +210,8 @@ lws_handle_POLLOUT_event(struct libwebsocket_context *context,
}
#ifndef LWS_NO_EXTENSIONS
wsi->extension_data_pending = 0;
user_service:
#endif
user_service:
/* one shot */
if (pollfd) {