mirror of
https://github.com/cesanta/mongoose.git
synced 2026-10-18 10:59:45 +00:00
Do not test reassembled buffer for WS_OP_CLOSE
PUBLISHED_FROM=0e8de208b553b63c8367f66893389587bd17359f
This commit is contained in:
1 parent
d85d95a40b
commit
aed6d05d8c
1 file changed
+2
-2
+2
-2
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user