mirror of
https://github.com/socketio/socket.io-client-cpp.git
synced 2026-06-10 12:15:44 +00:00
Avoid duplicated connection event for default namespace.
This commit is contained in:
parent
035ad01cc0
commit
c96f72c838
@ -265,8 +265,10 @@ namespace sio
|
||||
void socket::impl::send_connect()
|
||||
{
|
||||
NULL_GUARD(m_client);
|
||||
packet p(packet::type_connect,m_nsp);
|
||||
m_client->send(p);
|
||||
if(m_nsp!="/") {
|
||||
packet p(packet::type_connect,m_nsp);
|
||||
m_client->send(p);
|
||||
}
|
||||
m_connection_timer.reset(new boost::asio::deadline_timer(m_client->get_io_service()));
|
||||
boost::system::error_code ec;
|
||||
m_connection_timer->expires_from_now(boost::posix_time::milliseconds(20000), ec);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user