File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed
Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -273,7 +273,8 @@ namespace sio
273273 {
274274 if (ec || m_con.expired ())
275275 {
276- LOG (" ping exit,con is expired?" <<m_con.expired ()<<" ,ec:" <<ec.message ()<<endl);
276+ if (ec != boost::asio::error::operation_aborted)
277+ LOG (" ping exit,con is expired?" <<m_con.expired ()<<" ,ec:" <<ec.message ()<<endl);
277278 return ;
278279 }
279280 packet p (packet::frame_ping);
Original file line number Diff line number Diff line change @@ -316,6 +316,9 @@ namespace sio
316316 void socket::impl::on_close ()
317317 {
318318 NULL_GUARD (m_client);
319+ sio::client_impl *client = m_client;
320+ m_client = NULL ;
321+
319322 if (m_connection_timer)
320323 {
321324 m_connection_timer->cancel ();
@@ -325,9 +328,8 @@ namespace sio
325328 while (!m_packet_queue.empty ()) {
326329 m_packet_queue.pop ();
327330 }
328- m_client->on_socket_closed (m_nsp);
329- m_client->remove_socket (m_nsp);
330- m_client = NULL ;
331+ client->on_socket_closed (m_nsp);
332+ client->remove_socket (m_nsp);
331333 }
332334
333335 void socket::impl::on_open ()
You can’t perform that action at this time.
0 commit comments