Commit 88eb7b7
committed
fix(ws): ensure client parser handles control frames internally
The client-side bulk data handling optimization incorrectly bypassed the
internal state machine for control frames (PING, PONG, CLOSE) when they
carried a payload. This caused these frames to be passed to the user
callback as LWS_CALLBACK_CLIENT_RECEIVE data, preventing the library
from handling them correctly (e.g., auto-replying to PING).
This patch forces the parser to fallback to the byte-by-byte state machine
(lws_ws_client_rx_sm) whenever a control frame is detected (opcode & 8),
even if the parser is in the payload state. This ensures control frames
are processed correctly by the library.1 parent 46df866 commit 88eb7b7
1 file changed
+2
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
111 | 111 | | |
112 | 112 | | |
113 | 113 | | |
114 | | - | |
| 114 | + | |
| 115 | + | |
115 | 116 | | |
116 | 117 | | |
117 | 118 | | |
| |||
0 commit comments