summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2012-06-28 14:20:25 +0000
committerAlan Conway <aconway@apache.org>2012-06-28 14:20:25 +0000
commitbb45ec03f95ffdfa6c0163067dcb75af8b64ceb5 (patch)
treee3fcd6cbcd025923379788572cb03101cc560611
parentd5a5322d7c9644308a159d6f5d1f24c6e289bf1f (diff)
downloadqpid-python-bb45ec03f95ffdfa6c0163067dcb75af8b64ceb5.tar.gz
NO-JIRA: Get rid of noisy errors from rejected connections.
A HA backup broker used to reject client connections by throwing out of ConnectionObserver:opened. This is not an error, but generates a lot of noise in the form of error log messages. This patch calls Connection::abort() instead of throwing, which does not leave any error log messages. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1355018 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--qpid/cpp/src/qpid/ha/BackupConnectionExcluder.h5
-rw-r--r--qpid/cpp/src/qpid/ha/ConnectionObserver.cpp5
2 files changed, 4 insertions, 6 deletions
diff --git a/qpid/cpp/src/qpid/ha/BackupConnectionExcluder.h b/qpid/cpp/src/qpid/ha/BackupConnectionExcluder.h
index 2b7ddef3f1..ef537ab90a 100644
--- a/qpid/cpp/src/qpid/ha/BackupConnectionExcluder.h
+++ b/qpid/cpp/src/qpid/ha/BackupConnectionExcluder.h
@@ -36,9 +36,8 @@ class BackupConnectionExcluder : public broker::ConnectionObserver
{
public:
void opened(broker::Connection& connection) {
- // FIXME aconway 2012-06-13: suppress caught error message, make this an info message.
- QPID_LOG(error, "Backup broker rejected connection "+connection.getMgmtId());
- throw Exception("Backup broker rejected connection "+connection.getMgmtId());
+ QPID_LOG(debug, "Backup broker rejected connection "+connection.getMgmtId());
+ connection.abort();
}
void closed(broker::Connection&) {}
diff --git a/qpid/cpp/src/qpid/ha/ConnectionObserver.cpp b/qpid/cpp/src/qpid/ha/ConnectionObserver.cpp
index a5bacd5e31..553f50d802 100644
--- a/qpid/cpp/src/qpid/ha/ConnectionObserver.cpp
+++ b/qpid/cpp/src/qpid/ha/ConnectionObserver.cpp
@@ -61,9 +61,8 @@ void ConnectionObserver::opened(broker::Connection& connection) {
BrokerInfo info; // Avoid self connections.
if (getBrokerInfo(connection, info)) {
if (info.getSystemId() == self) {
- // FIXME aconway 2012-06-13: suppress caught error message, make this an info message.
- QPID_LOG(error, "HA broker rejected self connection "+connection.getMgmtId());
- throw Exception("HA broker rejected self connection "+connection.getMgmtId());
+ QPID_LOG(debug, "HA broker rejected self connection "+connection.getMgmtId());
+ connection.abort();
}
}