oatpp-websocket icon indicating copy to clipboard operation
oatpp-websocket copied to clipboard

The continuation frame causes the connection to drop

Open doufu3344 opened this issue 1 year ago • 0 comments

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

doufu3344 avatar Mar 24 '23 05:03 doufu3344