oatpp-websocket
oatpp-websocket copied to clipboard
The continuation frame causes the connection to drop
https://github.com/oatpp/oatpp-websocket/blob/d95c8ee6262d5e8051099018983715ebf4873db5/src/oatpp-websocket/WebSocket.cpp#L202-L219
In the above code, the m_lastOpcode
member is not updated when processing a frame with opcode=Frame::OPCODE_CONTINUATION
and fin=true
, so when processing Frame::OPCODE_TEXT
for the next frame, checkForContinuation()
returns false
and throws an exception. This results in a service disconnection.
https://github.com/oatpp/oatpp-websocket/blob/d95c8ee6262d5e8051099018983715ebf4873db5/src/oatpp-websocket/WebSocket.cpp#L58-L68
The same problem exists with asynchronous implementations