Skip to content

Commit

Permalink
Fix bug: onclose is repeatedly invoked to cause a segment error
Browse files Browse the repository at this point in the history
Signed-off-by: Jianhui Zhao <jianhuizhao329@gmail.com>
  • Loading branch information
Jianhui Zhao committed Jan 18, 2018
1 parent 1c6119b commit 33dbcad
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/uwsc.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ static void dispach_message(struct uwsc_client *cl)
cl->send(cl, frame->payload, frame->payload_len, WEBSOCKET_OP_PONG);
break;
case WEBSOCKET_OP_CLOSE:
if (cl->onclose)
cl->onclose(cl);
uwsc_error(cl, 0);
break;
default:
break;
}
Expand Down

0 comments on commit 33dbcad

Please sign in to comment.