We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a725bb6 commit 669a475Copy full SHA for 669a475
src/sio_socket.cpp
@@ -316,6 +316,9 @@ namespace sio
316
void socket::impl::on_close()
317
{
318
NULL_GUARD(m_client);
319
+ sio::client_impl *client = m_client;
320
+ m_client = NULL;
321
+
322
if(m_connection_timer)
323
324
m_connection_timer->cancel();
@@ -325,9 +328,8 @@ namespace sio
325
328
while (!m_packet_queue.empty()) {
326
329
m_packet_queue.pop();
327
330
}
- m_client->on_socket_closed(m_nsp);
- m_client->remove_socket(m_nsp);
- m_client = NULL;
331
+ client->on_socket_closed(m_nsp);
332
+ client->remove_socket(m_nsp);
333
334
335
void socket::impl::on_open()
0 commit comments