context destroy just kill wsis
Signed-off-by: Andy Green <andy.green@linaro.org>
This commit is contained in:
parent
106d4a8a50
commit
8ec7802935
2 changed files with 5 additions and 2 deletions
|
@ -52,7 +52,7 @@ libwebsocket_close_and_free_session(struct libwebsocket_context *context,
|
|||
|
||||
old_state = wsi->state;
|
||||
|
||||
if (wsi->socket_is_permanently_unusable)
|
||||
if (wsi->socket_is_permanently_unusable || reason == LWS_CLOSE_STATUS_NOSTATUS_CONTEXT_DESTROY)
|
||||
goto just_kill_connection;
|
||||
|
||||
switch (old_state) {
|
||||
|
@ -164,7 +164,8 @@ libwebsocket_close_and_free_session(struct libwebsocket_context *context,
|
|||
*/
|
||||
|
||||
if (old_state == WSI_STATE_ESTABLISHED &&
|
||||
reason != LWS_CLOSE_STATUS_NOSTATUS) {
|
||||
reason != LWS_CLOSE_STATUS_NOSTATUS &&
|
||||
reason != LWS_CLOSE_STATUS_NOSTATUS_CONTEXT_DESTROY) {
|
||||
|
||||
lwsl_debug("sending close indication...\n");
|
||||
|
||||
|
|
|
@ -524,6 +524,8 @@ enum lws_close_status {
|
|||
LWS_CLOSE_STATUS_EXTENSION_REQUIRED = 1010,
|
||||
LWS_CLOSE_STATUS_UNEXPECTED_CONDITION = 1011,
|
||||
LWS_CLOSE_STATUS_TLS_FAILURE = 1015,
|
||||
|
||||
LWS_CLOSE_STATUS_NOSTATUS_CONTEXT_DESTROY = 9999,
|
||||
};
|
||||
|
||||
enum http_status {
|
||||
|
|
Loading…
Add table
Reference in a new issue