fix: fix LOG call syntax (#301)

Related: https://github.com/socketio/socket.io-client-cpp/issues/212
This commit is contained in:
Rich E 2021-04-22 15:10:31 -04:00 committed by Damien Arrachequesne
parent b1216ee428
commit c09221f357
No known key found for this signature in database
GPG Key ID: 544D14663E7F7CF0

View File

@ -286,7 +286,7 @@ namespace sio
if(ec || m_con.expired()) if(ec || m_con.expired())
{ {
if (ec != asio::error::operation_aborted) if (ec != asio::error::operation_aborted)
LOG("ping exit,con is expired?"<<m_con.expired()<<",ec:"<<ec.message()<<endl){}; LOG("ping exit,con is expired?"<<m_con.expired()<<",ec:"<<ec.message()<<endl);
return; return;
} }
packet p(packet::frame_ping); packet p(packet::frame_ping);
@ -500,7 +500,7 @@ namespace sio
m_ping_timer.reset(new asio::steady_timer(m_client.get_io_service())); m_ping_timer.reset(new asio::steady_timer(m_client.get_io_service()));
asio::error_code ec; asio::error_code ec;
m_ping_timer->expires_from_now(milliseconds(m_ping_interval), ec); m_ping_timer->expires_from_now(milliseconds(m_ping_interval), ec);
if(ec)LOG("ec:"<<ec.message()<<endl){}; if(ec)LOG("ec:"<<ec.message()<<endl);
m_ping_timer->async_wait(std::bind(&client_impl::ping,this, std::placeholders::_1)); m_ping_timer->async_wait(std::bind(&client_impl::ping,this, std::placeholders::_1));
LOG("On handshake,sid:"<<m_sid<<",ping interval:"<<m_ping_interval<<",ping timeout"<<m_ping_timeout<<endl); LOG("On handshake,sid:"<<m_sid<<",ping interval:"<<m_ping_interval<<",ping timeout"<<m_ping_timeout<<endl);
return; return;