From 5e49fad1d97ee2b1620f9ba98456004f24001120 Mon Sep 17 00:00:00 2001 From: Andre Antunes Date: Sun, 11 Sep 2011 13:03:20 -0300 Subject: [PATCH] fixing memory leak when connection fail --- src/framework/net/connection.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/framework/net/connection.cpp b/src/framework/net/connection.cpp index f3300cb0..06e1d432 100644 --- a/src/framework/net/connection.cpp +++ b/src/framework/net/connection.cpp @@ -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)