fix:WebSocket connection to 'ws://XXXX/' failed: A server must not mask any frames that it sends to the client. (#12882)

This commit is contained in:
oahc09
2022-09-27 17:45:56 +08:00
committed by GitHub
parent 108c9de774
commit c2d6d7fc53
+4 -1
View File
@@ -390,7 +390,10 @@ WebSocketServerConnection::~WebSocketServerConnection() {
bool WebSocketServerConnection::send(std::shared_ptr<DataFrame> data) {
_sendQueue.emplace_back(data);
onDrainData();
if (!_wsi || _closed || _readyState == ReadyState::CLOSING) {
return false;
}
lws_callback_on_writable(_wsi);
return true;
}