Skip to content

Commit

Permalink
client callback closed if not upgraded
Browse files Browse the repository at this point in the history
#437

Signed-off-by: Andy Green <andy.green@linaro.org>
  • Loading branch information
Andy Green committed Feb 23, 2016
1 parent ad1ccf2 commit 021d4fb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/libwebsockets.c
Expand Up @@ -372,7 +372,8 @@ lws_close_free_wsi(struct lws *wsi, enum lws_close_status reason)
((wsi->state_pre_close == LWSS_ESTABLISHED) ||
(wsi->state_pre_close == LWSS_RETURNED_CLOSE_ALREADY) ||
(wsi->state_pre_close == LWSS_AWAITING_CLOSE_ACK) ||
(wsi->state_pre_close == LWSS_FLUSHING_STORED_SEND_BEFORE_CLOSE))) {
(wsi->state_pre_close == LWSS_FLUSHING_STORED_SEND_BEFORE_CLOSE) ||
(wsi->mode == LWSCM_WS_CLIENT && wsi->state == LWSS_HTTP))) {
lwsl_debug("calling back CLOSED\n");
wsi->protocol->callback(wsi, LWS_CALLBACK_CLOSED,
wsi->user_space, NULL, 0);
Expand Down

0 comments on commit 021d4fb

Please sign in to comment.