From bb45ec03f95ffdfa6c0163067dcb75af8b64ceb5 Mon Sep 17 00:00:00 2001 From: Alan Conway Date: Thu, 28 Jun 2012 14:20:25 +0000 Subject: 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 --- qpid/cpp/src/qpid/ha/BackupConnectionExcluder.h | 5 ++--- qpid/cpp/src/qpid/ha/ConnectionObserver.cpp | 5 ++--- 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(); } } -- cgit v1.2.1