diff options
| author | Alan Conway <aconway@apache.org> | 2010-07-01 19:19:48 +0000 |
|---|---|---|
| committer | Alan Conway <aconway@apache.org> | 2010-07-01 19:19:48 +0000 |
| commit | e5c4aeb61ddb5b86cd6d20852002d7267bc90212 (patch) | |
| tree | 49b1de86eb37b356f8ef212e450d3ee3dc6d2486 /cpp/include | |
| parent | 22f2c71123be16ae51cd6e145905b33dfb4cbe60 (diff) | |
| download | qpid-python-e5c4aeb61ddb5b86cd6d20852002d7267bc90212.tar.gz | |
Fix spordic failure in cluster_test testConnectionKnownHosts.
Very occasional failure of the form:
cluster_test.cpp(547): error in "testConnectionKnownHosts": check kb0 == kb2 failed [42179 57640 != 44199 57640 ] ])
Fix is to avoid using possibly out-of-date initial-brokers data from the connection.
Only rely on updates received from the amq.failover exchange.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@959751 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/include')
| -rw-r--r-- | cpp/include/qpid/client/FailoverListener.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/cpp/include/qpid/client/FailoverListener.h b/cpp/include/qpid/client/FailoverListener.h index 8414b80f2b..59108eb7cb 100644 --- a/cpp/include/qpid/client/FailoverListener.h +++ b/cpp/include/qpid/client/FailoverListener.h @@ -60,6 +60,12 @@ class FailoverListener : private MessageListener, private qpid::sys::Runnable /** Subscribe to amq.failover exchange. */ QPID_CLIENT_EXTERN FailoverListener(Connection); + /** Subscribe to amq.failover exchange. + *@param useInitial If true use the connection's initial brokers as + * the initial value of getKnownBrokers + */ + QPID_CLIENT_EXTERN FailoverListener(Connection, bool useInitial); + QPID_CLIENT_EXTERN ~FailoverListener(); /** Returns the latest list of known broker URLs. */ @@ -68,7 +74,8 @@ class FailoverListener : private MessageListener, private qpid::sys::Runnable private: void received(Message& msg); void run(); - + void init(bool); + mutable sys::Mutex lock; Connection connection; Session session; |
