diff options
| author | Alan Conway <aconway@apache.org> | 2009-07-01 13:47:04 +0000 |
|---|---|---|
| committer | Alan Conway <aconway@apache.org> | 2009-07-01 13:47:04 +0000 |
| commit | 62b700b251111d7c0cb09d2b99ec0bfaa180b54e (patch) | |
| tree | 0dc872980a64b2461a72f1eb76d1e31a21979e79 /qpid/cpp/src/tests/qpid_ping.cpp | |
| parent | d8e8cbb3117a5537c83f244aa049f6b7bdbf9504 (diff) | |
| download | qpid-python-62b700b251111d7c0cb09d2b99ec0bfaa180b54e.tar.gz | |
Fix members joining cluster while cluster is handling client errors.
Previously cluster members could abort if a new member joins while
existing members are handling a client error.
Now if an update offer arrives while an error is in progress, the
offering broker retracts the offer and the newcomer must try again.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@790163 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/src/tests/qpid_ping.cpp')
| -rw-r--r-- | qpid/cpp/src/tests/qpid_ping.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/qpid/cpp/src/tests/qpid_ping.cpp b/qpid/cpp/src/tests/qpid_ping.cpp index ddd70515be..cc07ade7bb 100644 --- a/qpid/cpp/src/tests/qpid_ping.cpp +++ b/qpid/cpp/src/tests/qpid_ping.cpp @@ -23,7 +23,7 @@ #include "TestOptions.h" #include "qpid/client/SubscriptionManager.h" #include "qpid/client/Connection.h" -#include "qpid/client/Session.h" +#include "qpid/client/AsyncSession.h" #include "qpid/sys/Time.h" #include "qpid/sys/Thread.h" #include "qpid/sys/Runnable.h" @@ -63,7 +63,7 @@ class Ping : public Runnable { try { opts.open(connection); if (!opts.quiet) cout << "Opened connection." << endl; - Session s = connection.newSession(); + AsyncSession s = connection.newSession(); string qname(Uuid(true).str()); s.queueDeclare(arg::queue=qname,arg::autoDelete=true,arg::exclusive=true); s.messageTransfer(arg::content=Message("hello", qname)); @@ -71,6 +71,7 @@ class Ping : public Runnable { SubscriptionManager subs(s); subs.get(qname); if (!opts.quiet) cout << "Received message." << endl; + s.sync(); s.close(); connection.close(); Mutex::ScopedLock l(lock); |
