From 3a0d4cd17abf3a39a8e5103cb0d9b5b4fd3bb55e Mon Sep 17 00:00:00 2001 From: Alan Conway Date: Fri, 5 Oct 2012 18:21:45 +0000 Subject: QPID-4360: Non-ready HA broker can be incorrectly promoted to primary A joining broker now attempts to contact all known members of the cluster and check their status. If any brokers are in a state other than "joining" the broker will refuse to promote. This will allow rgmanager to continue to try addresses till it finds a ready brokers. Note this reqiures ha-brokers-url to be a list of all known brokers, not a virtual IP. ha-public-url can still be a VIP. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1394706 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/src/qpid/client/ConnectionHandler.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'cpp/src/qpid/client/ConnectionHandler.cpp') diff --git a/cpp/src/qpid/client/ConnectionHandler.cpp b/cpp/src/qpid/client/ConnectionHandler.cpp index 91838d8e8b..4f88cb97ee 100644 --- a/cpp/src/qpid/client/ConnectionHandler.cpp +++ b/cpp/src/qpid/client/ConnectionHandler.cpp @@ -82,9 +82,11 @@ void ConnectionHandler::Adapter::handle(qpid::framing::AMQFrame& f) handler.out(f); } -ConnectionHandler::ConnectionHandler(const ConnectionSettings& s, ProtocolVersion& v, Bounds& b) - : StateManager(NOT_STARTED), ConnectionSettings(s), outHandler(*this, b), proxy(outHandler), - errorCode(CLOSE_CODE_NORMAL), version(v) +ConnectionHandler::ConnectionHandler( + const ConnectionSettings& s, ProtocolVersion& v, Bounds& b) + : StateManager(NOT_STARTED), ConnectionSettings(s), + outHandler(*this, b), proxy(outHandler), errorCode(CLOSE_CODE_NORMAL), version(v), + properties(s.clientProperties) { insist = true; -- cgit v1.2.1