mirror of
https://github.com/socketio/socket.io-client-cpp.git
synced 2026-06-13 05:41:51 +00:00
Merge pull request #29 from pkwong4321/master
Skip LOG in ping, fix heap error, fix #30
This commit is contained in:
commit
ccdd0c5bcc
@ -273,7 +273,8 @@ namespace sio
|
||||
{
|
||||
if(ec || m_con.expired())
|
||||
{
|
||||
LOG("ping exit,con is expired?"<<m_con.expired()<<",ec:"<<ec.message()<<endl);
|
||||
if (ec != boost::asio::error::operation_aborted)
|
||||
LOG("ping exit,con is expired?"<<m_con.expired()<<",ec:"<<ec.message()<<endl);
|
||||
return;
|
||||
}
|
||||
packet p(packet::frame_ping);
|
||||
|
||||
@ -316,6 +316,9 @@ namespace sio
|
||||
void socket::impl::on_close()
|
||||
{
|
||||
NULL_GUARD(m_client);
|
||||
sio::client_impl *client = m_client;
|
||||
m_client = NULL;
|
||||
|
||||
if(m_connection_timer)
|
||||
{
|
||||
m_connection_timer->cancel();
|
||||
@ -325,9 +328,8 @@ namespace sio
|
||||
while (!m_packet_queue.empty()) {
|
||||
m_packet_queue.pop();
|
||||
}
|
||||
m_client->on_socket_closed(m_nsp);
|
||||
m_client->remove_socket(m_nsp);
|
||||
m_client = NULL;
|
||||
client->on_socket_closed(m_nsp);
|
||||
client->remove_socket(m_nsp);
|
||||
}
|
||||
|
||||
void socket::impl::on_open()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user