Skip to content

Commit

Permalink
[fixed] when receive a close frame, should request a close frame too
Browse files Browse the repository at this point in the history
  • Loading branch information
alawn-wang committed Dec 14, 2023
1 parent ab57d2f commit a9e844c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/supplemental/websocket/websocket.c
Original file line number Diff line number Diff line change
Expand Up @@ -990,8 +990,8 @@ ws_read_frame_cb(nni_ws *ws, ws_frame *frame)
ws_frame_fini(frame);
break;
case WS_CLOSE:
ws->closed = true; // no need to send close reply
ws_close(ws, 0);
ws_close(ws, WS_CLOSE_NORMAL_CLOSE);
ws->closed = true;
return;
default:
ws_close(ws, WS_CLOSE_PROTOCOL_ERR);
Expand Down

0 comments on commit a9e844c

Please sign in to comment.