fixing memory leak when connection fail
This commit is contained in:
parent
9aa87da074
commit
5e49fad1d9
|
@ -132,14 +132,14 @@ void Connection::onConnect(const boost::system::error_code& error)
|
|||
{
|
||||
m_readTimer.cancel();
|
||||
|
||||
m_connecting = false;
|
||||
|
||||
if(!error) {
|
||||
m_connected = true;
|
||||
if(m_connectCallback)
|
||||
g_dispatcher.addEvent(m_connectCallback);
|
||||
} else
|
||||
handleError(error);
|
||||
|
||||
m_connecting = false;
|
||||
}
|
||||
|
||||
void Connection::onWrite(const boost::system::error_code& error, size_t)
|
||||
|
|
Loading…
Reference in New Issue