From 56fb1f26a04a9ba2b6af40c6933f8dcc79143772 Mon Sep 17 00:00:00 2001 From: Alan Conway Date: Tue, 14 Oct 2008 19:35:33 +0000 Subject: Minor cleanup for client failover. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@704637 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/src/qpid/client/ConnectionHandler.cpp | 2 +- cpp/src/qpid/client/Dispatcher.cpp | 14 ++++---------- cpp/src/qpid/client/FailoverListener.cpp | 4 +--- 3 files changed, 6 insertions(+), 14 deletions(-) (limited to 'cpp/src/qpid/client') diff --git a/cpp/src/qpid/client/ConnectionHandler.cpp b/cpp/src/qpid/client/ConnectionHandler.cpp index 5fbe87878a..34bf8708cb 100644 --- a/cpp/src/qpid/client/ConnectionHandler.cpp +++ b/cpp/src/qpid/client/ConnectionHandler.cpp @@ -166,7 +166,7 @@ void ConnectionHandler::openOk ( const framing::Array& knownBrokers ) for ( i = knownBrokers.begin(); i != knownBrokers.end(); ++i ) knownBrokersUrls.push_back(Url((*i)->get())); setState(OPEN); - QPID_LOG(info, "Known-brokers for connection: " << log::formatList(knownBrokersUrls)); + QPID_LOG(debug, "Known-brokers for connection: " << log::formatList(knownBrokersUrls)); } diff --git a/cpp/src/qpid/client/Dispatcher.cpp b/cpp/src/qpid/client/Dispatcher.cpp index 08905bc96c..fd9d8a8ad1 100644 --- a/cpp/src/qpid/client/Dispatcher.cpp +++ b/cpp/src/qpid/client/Dispatcher.cpp @@ -38,7 +38,7 @@ namespace qpid { namespace client { Subscriber::Subscriber(const Session& s, MessageListener* l, AckPolicy a) - : session(s), listener(l), autoAck(a) {} + : session(s), listener(l), autoAck(a) {} void Subscriber::received(Message& msg) { @@ -96,18 +96,12 @@ void Dispatcher::run() } catch (const ClosedException& e) { - QPID_LOG(debug, "Ignored exception in client dispatch thread: " << e.what()); + QPID_LOG(debug, "Ignored exception in client dispatch thread: " << e.what()); } //ignore it and return catch (const std::exception& e) { QPID_LOG(error, "Exception in client dispatch thread: " << e.what()); - if ( failoverHandler ) - { - failoverHandler(); - } - else - { - QPID_LOG(info, "No dispatcher failover handler registered."); - } + if ( failoverHandler ) + failoverHandler(); } } diff --git a/cpp/src/qpid/client/FailoverListener.cpp b/cpp/src/qpid/client/FailoverListener.cpp index 591bea91e8..e13f240439 100644 --- a/cpp/src/qpid/client/FailoverListener.cpp +++ b/cpp/src/qpid/client/FailoverListener.cpp @@ -65,9 +65,7 @@ void FailoverListener::stop() { } FailoverListener::~FailoverListener() { try { stop(); } - catch (const std::exception& e) { - QPID_LOG(warning, QPID_MSG("Ignoring exception in destructor" << e.what())); - } + catch (const std::exception& e) {} } void FailoverListener::received(Message& msg) { -- cgit v1.2.1