You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-05 12:10:55 +00:00
Fix WebSocket crash due to non PDO init.
Move RingBuffer (and few related vars) to LWSPeer.
This commit is contained in:
@@ -92,11 +92,6 @@ int LWSServer::_handle_cb(struct lws *wsi, enum lws_callback_reasons reason, voi
|
||||
_peer_map[id] = peer;
|
||||
|
||||
peer_data->peer_id = id;
|
||||
peer_data->in_size = 0;
|
||||
peer_data->in_count = 0;
|
||||
peer_data->out_count = 0;
|
||||
peer_data->rbw.resize(16);
|
||||
peer_data->rbr.resize(16);
|
||||
peer_data->force_close = false;
|
||||
|
||||
_on_connect(id, lws_get_protocol(wsi)->name);
|
||||
@@ -111,10 +106,6 @@ int LWSServer::_handle_cb(struct lws *wsi, enum lws_callback_reasons reason, voi
|
||||
_peer_map[id]->close();
|
||||
_peer_map.erase(id);
|
||||
}
|
||||
peer_data->in_count = 0;
|
||||
peer_data->out_count = 0;
|
||||
peer_data->rbr.resize(0);
|
||||
peer_data->rbw.resize(0);
|
||||
_on_disconnect(id);
|
||||
return 0; // we can end here
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user