summaryrefslogtreecommitdiff
path: root/cpp
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
commitc2bbeac3f94cb57e142648ebcac354a41ad5ab6f (patch)
treefdb9f3577bb3048baf3629c54a708c4d7c562cf8 /cpp
parentb19e87903ef322b50ebddc9140decba0898b9f4e (diff)
downloadqpid-python-c2bbeac3f94cb57e142648ebcac354a41ad5ab6f.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/qpid@1355018 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp')
-rw-r--r--cpp/src/qpid/ha/BackupConnectionExcluder.h5
-rw-r--r--cpp/src/qpid/ha/ConnectionObserver.cpp5
2 files changed, 4 insertions, 6 deletions
diff --git a/cpp/src/qpid/ha/BackupConnectionExcluder.h b/cpp/src/qpid/ha/BackupConnectionExcluder.h
index 2b7ddef3f1..ef537ab90a 100644
--- a/cpp/src/qpid/ha/BackupConnectionExcluder.h
+++ b/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/cpp/src/qpid/ha/ConnectionObserver.cpp b/cpp/src/qpid/ha/ConnectionObserver.cpp
index a5bacd5e31..553f50d802 100644
--- a/cpp/src/qpid/ha/ConnectionObserver.cpp
+++ b/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();
}
}