Skip to content

Commit

Permalink
also callback closed if flushing
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanschuermans authored and Andy Green committed Sep 8, 2014
1 parent 8721f4f commit b944cc1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/libwebsockets.c
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,8 @@ libwebsocket_close_and_free_session(struct libwebsocket_context *context,
if (wsi->protocol && wsi->protocol->callback &&
((old_state == WSI_STATE_ESTABLISHED) ||
(old_state == WSI_STATE_RETURNED_CLOSE_ALREADY) ||
(old_state == WSI_STATE_AWAITING_CLOSE_ACK))) {
(old_state == WSI_STATE_AWAITING_CLOSE_ACK) ||
(old_state == WSI_STATE_FLUSHING_STORED_SEND_BEFORE_CLOSE))) {
lwsl_debug("calling back CLOSED\n");
wsi->protocol->callback(context, wsi, LWS_CALLBACK_CLOSED,
wsi->user_space, NULL, 0);
Expand Down

0 comments on commit b944cc1

Please sign in to comment.