From 6e768d581631618828d5224607f1f4bf815ec2b1 Mon Sep 17 00:00:00 2001 From: Peter Thorson Date: Mon, 5 Mar 2012 11:40:29 -0600 Subject: [PATCH] client properly fires on_fail on connection failure references #69 --- src/roles/client.hpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/roles/client.hpp b/src/roles/client.hpp index 1861e4564b..038404d756 100644 --- a/src/roles/client.hpp +++ b/src/roles/client.hpp @@ -306,12 +306,12 @@ void client::handle_connect(connection_ptr con, << "An error occurred while establishing a connection: " << error << " (connection reset)" << log::endl; - if (con->retry()) { + /*if (con->retry()) { m_endpoint.elog().at(log::elevel::ERROR) << "Retrying connection" << log::endl; connect(con->get_uri()); m_endpoint.remove_connection(con); - } + }*/ } else if (error == boost::system::errc::timed_out) { m_endpoint.elog().at(log::elevel::ERROR) << "An error occurred while establishing a connection: " @@ -326,6 +326,7 @@ void client::handle_connect(connection_ptr con, << error << " (unknown)" << log::endl; throw "client error"; } + m_endpoint.get_handler()->on_fail(con->shared_from_this()); } }