mirror of
https://github.com/cocos/cocos4.git
synced 2026-11-20 23:52:40 +08:00
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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user