diff options
| author | Alan Conway <aconway@apache.org> | 2008-10-10 17:44:50 +0000 |
|---|---|---|
| committer | Alan Conway <aconway@apache.org> | 2008-10-10 17:44:50 +0000 |
| commit | d1bc2d8115b9079be2baa61f2d60e36656fb5cf4 (patch) | |
| tree | dbe771c3823884ae1726fcf5bf8dabe5194c0243 /qpid/cpp/src | |
| parent | d7c677547f17a51f8c97ea10b7516fd44ef8d1d2 (diff) | |
| download | qpid-python-d1bc2d8115b9079be2baa61f2d60e36656fb5cf4.tar.gz | |
Failover client and example fixes & tidy up.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@703532 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/src')
| -rw-r--r-- | qpid/cpp/src/qpid/client/Connection.cpp | 2 | ||||
| -rw-r--r-- | qpid/cpp/src/qpid/client/ConnectionImpl.cpp | 7 | ||||
| -rw-r--r-- | qpid/cpp/src/qpid/client/FailoverListener.cpp | 5 |
3 files changed, 7 insertions, 7 deletions
diff --git a/qpid/cpp/src/qpid/client/Connection.cpp b/qpid/cpp/src/qpid/client/Connection.cpp index 3ee70c222a..e393d135f6 100644 --- a/qpid/cpp/src/qpid/client/Connection.cpp +++ b/qpid/cpp/src/qpid/client/Connection.cpp @@ -139,7 +139,7 @@ void Connection::close() { } std::vector<Url> Connection::getKnownBrokers() { - return isOpen() ? impl->getKnownBrokers() : std::vector<Url>(); + return impl ? impl->getKnownBrokers() : std::vector<Url>(); } }} // namespace qpid::client diff --git a/qpid/cpp/src/qpid/client/ConnectionImpl.cpp b/qpid/cpp/src/qpid/client/ConnectionImpl.cpp index 93eea50e43..5d4723b442 100644 --- a/qpid/cpp/src/qpid/client/ConnectionImpl.cpp +++ b/qpid/cpp/src/qpid/client/ConnectionImpl.cpp @@ -151,11 +151,8 @@ static const std::string CONN_CLOSED("Connection closed by broker"); void ConnectionImpl::shutdown() { Mutex::ScopedLock l(lock); - if (handler.isClosed()) - { - std::cerr << "MDEBUG ConnectionImpl::shutdown -- returning w/o failure callback!\n"; - return; - } + if (handler.isClosed()) return; + // FIXME aconway 2008-06-06: exception use, amqp0-10 does not seem to have // an appropriate close-code. connection-forced is not right. if (!handler.isClosing()) diff --git a/qpid/cpp/src/qpid/client/FailoverListener.cpp b/qpid/cpp/src/qpid/client/FailoverListener.cpp index 5ca617138c..591bea91e8 100644 --- a/qpid/cpp/src/qpid/client/FailoverListener.cpp +++ b/qpid/cpp/src/qpid/client/FailoverListener.cpp @@ -64,7 +64,10 @@ void FailoverListener::stop() { subscriptions.reset(); } FailoverListener::~FailoverListener() { - stop(); + try { stop(); } + catch (const std::exception& e) { + QPID_LOG(warning, QPID_MSG("Ignoring exception in destructor" << e.what())); + } } void FailoverListener::received(Message& msg) { |
