Commit aed6d05d authored by Alexander Alashkin's avatar Alexander Alashkin Committed by Cesanta Bot

Do not test reassembled buffer for WS_OP_CLOSE

PUBLISHED_FROM=0e8de208b553b63c8367f66893389587bd17359f
parent d85d95a4
......@@ -8888,8 +8888,8 @@ static int mg_deliver_websocket_data(struct mg_connection *nc) {
mbuf_remove(&nc->recv_mbuf, (size_t) frame_len); /* Cleanup frame */
}
/* If client closes, close too */
if ((buf[0] & 0x0f) == WEBSOCKET_OP_CLOSE) {
/* If the frame is not reassembled - client closes and close too */
if (!reass && (buf[0] & 0x0f) == WEBSOCKET_OP_CLOSE) {
nc->flags |= MG_F_SEND_AND_CLOSE;
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment