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:
parent
f7e2a85e11
commit
2488c46c9b
1 changed files with 6 additions and 2 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Reference in a new issue