You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
throwstd::runtime_error("[oatpp::web::protocol::websocket::WebSocket::handleFrame()]: Invalid communication state.");
}
readPayload(frameHeader, nullptr);
break;
case Frame::OPCODE_TEXT:
if(checkForContinuation(frameHeader)) {
readPayload(frameHeader, nullptr);
} else {
throwstd::runtime_error("[oatpp::web::protocol::websocket::WebSocket::handleFrame()]: Invalid communication state. OPCODE_CONTINUATION expected");
}
break;
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.
oatpp-websocket/src/oatpp-websocket/WebSocket.cpp
Lines 202 to 219 in d95c8ee
In the above code, the
m_lastOpcode
member is not updated when processing a frame withopcode=Frame::OPCODE_CONTINUATION
andfin=true
, so when processingFrame::OPCODE_TEXT
for the next frame,checkForContinuation()
returnsfalse
and throws an exception. This results in a service disconnection.oatpp-websocket/src/oatpp-websocket/WebSocket.cpp
Lines 58 to 68 in d95c8ee
The same problem exists with asynchronous implementations
The text was updated successfully, but these errors were encountered: