diff options
| author | Alan Conway <aconway@apache.org> | 2012-06-28 14:20:25 +0000 |
|---|---|---|
| committer | Alan Conway <aconway@apache.org> | 2012-06-28 14:20:25 +0000 |
| commit | c2bbeac3f94cb57e142648ebcac354a41ad5ab6f (patch) | |
| tree | fdb9f3577bb3048baf3629c54a708c4d7c562cf8 /cpp | |
| parent | b19e87903ef322b50ebddc9140decba0898b9f4e (diff) | |
| download | qpid-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.h | 5 | ||||
| -rw-r--r-- | cpp/src/qpid/ha/ConnectionObserver.cpp | 5 |
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(); } } |
