Do not test reassembled buffer for WS_OP_CLOSE

PUBLISHED_FROM=0e8de208b553b63c8367f66893389587bd17359f
This commit is contained in:
Alexander Alashkin authored and Cesanta Bot committed 2017-03-01 10:06:46 +00:00
1 parent d85d95a40b
commit aed6d05d8c
1 file changed
+2 -2
+2 -2
View File
@@ -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;
}
}