summaryrefslogtreecommitdiffstats
path: root/modules/websocket/lws_client.cpp
diff options
context:
space:
mode:
authorFabio Alessandrelli <fabio.alessandrelli@gmail.com>2018-08-06 03:40:26 +0200
committerFabio Alessandrelli <fabio.alessandrelli@gmail.com>2018-08-06 03:47:02 +0200
commit6a57f295730f1ab594e905fccba5a05578a2f5a0 (patch)
tree706ddc7ded9c77fe26dfaf06326b421c86697ae8 /modules/websocket/lws_client.cpp
parentb5a20d21f2e20a4c2001909574094db10abba06b (diff)
downloadredot-engine-6a57f295730f1ab594e905fccba5a05578a2f5a0.tar.gz
Fix WebSocket crash due to non PDO init.
Move RingBuffer (and few related vars) to LWSPeer.
Diffstat (limited to 'modules/websocket/lws_client.cpp')
-rw-r--r--modules/websocket/lws_client.cpp9
1 files changed, 0 insertions, 9 deletions
diff --git a/modules/websocket/lws_client.cpp b/modules/websocket/lws_client.cpp
index 06f97aaf05..ac31daa108 100644
--- a/modules/websocket/lws_client.cpp
+++ b/modules/websocket/lws_client.cpp
@@ -127,11 +127,6 @@ int LWSClient::_handle_cb(struct lws *wsi, enum lws_callback_reasons reason, voi
case LWS_CALLBACK_CLIENT_ESTABLISHED:
peer->set_wsi(wsi);
peer_data->peer_id = 0;
- 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(lws_get_protocol(wsi)->name);
break;
@@ -142,10 +137,6 @@ int LWSClient::_handle_cb(struct lws *wsi, enum lws_callback_reasons reason, voi
return -1; // we should close the connection (would probably happen anyway)
case LWS_CALLBACK_CLIENT_CLOSED:
- peer_data->in_count = 0;
- peer_data->out_count = 0;
- peer_data->rbw.resize(0);
- peer_data->rbr.resize(0);
peer->close();
destroy_context();
_on_disconnect();