mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-09 00:00:04 +01:00
close: make sure all paths capture original state
This commit is contained in:
parent
3031666dc7
commit
e1cdb1f328
1 changed files with 2 additions and 2 deletions
|
@ -402,6 +402,8 @@ lws_close_free_wsi(struct lws *wsi, enum lws_close_status reason)
|
|||
goto async_close;
|
||||
}
|
||||
|
||||
wsi->state_pre_close = wsi->state;
|
||||
|
||||
#ifdef LWS_WITH_CGI
|
||||
if (wsi->mode == LWSCM_CGI) {
|
||||
/* we are not a network connection, but a handler for CGI io */
|
||||
|
@ -446,8 +448,6 @@ lws_close_free_wsi(struct lws *wsi, enum lws_close_status reason)
|
|||
wsi->state == LWSS_SHUTDOWN)
|
||||
goto just_kill_connection;
|
||||
|
||||
wsi->state_pre_close = wsi->state;
|
||||
|
||||
switch (wsi->state_pre_close) {
|
||||
case LWSS_DEAD_SOCKET:
|
||||
return;
|
||||
|
|
Loading…
Add table
Reference in a new issue