mirror of
https://github.com/lammertb/libhttp.git
synced 2025-08-09 03:22:45 +03:00
Use defined constant for WEBSOCKET_OPCODE_CONNECTION_CLOSE test.
This commit is contained in:
committed by
Thomas Davis
parent
62da37e4ab
commit
aa51d80d24
@@ -4370,7 +4370,7 @@ static void read_websocket(struct mg_connection *conn)
|
||||
// or "connection close" opcode received.
|
||||
if ((conn->ctx->callbacks.websocket_data != NULL &&
|
||||
!conn->ctx->callbacks.websocket_data(conn, buf[0], data, data_len)) ||
|
||||
(buf[0] & 0xf) == 8) { // Opcode == 8, connection close
|
||||
(buf[0] & 0xf) == WEBSOCKET_OPCODE_CONNECTION_CLOSE) { // Opcode == 8, connection close
|
||||
break;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user