summaryrefslogtreecommitdiff
path: root/cpp/src/tests/ClusterFixture.cpp
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2010-03-15 20:08:10 +0000
committerAlan Conway <aconway@apache.org>2010-03-15 20:08:10 +0000
commitf1376af1bf413c04057879780c3e89c9176eba8a (patch)
treef9e9ce58f38a1e28c8f34b0c2355c67ad611f0e1 /cpp/src/tests/ClusterFixture.cpp
parentab3cb1b00b0bcbaa2a69d6415d384d0c6a9f6e4f (diff)
downloadqpid-python-f1376af1bf413c04057879780c3e89c9176eba8a.tar.gz
Work-around for race condition in the IO layer.
Added a 100ms sleep in UpdateClient between calling Connection::close() and destroying the Connection object. This appears to work around the race condition described in https://bugzilla.redhat.com/show_bug.cgi?id=568831. which was causing brokers to seg fault sporadically at the end of giving an update. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@923414 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/tests/ClusterFixture.cpp')
-rw-r--r--cpp/src/tests/ClusterFixture.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/cpp/src/tests/ClusterFixture.cpp b/cpp/src/tests/ClusterFixture.cpp
index fd90ed170e..b7e8e88abf 100644
--- a/cpp/src/tests/ClusterFixture.cpp
+++ b/cpp/src/tests/ClusterFixture.cpp
@@ -130,11 +130,11 @@ void ClusterFixture::kill(size_t n, int sig) {
forkedBrokers[n]->kill(sig);
}
-/** Kill a broker and suppressing errors from closing connection c. */
+/** Kill a broker and suppress errors from closing connection c. */
void ClusterFixture::killWithSilencer(size_t n, client::Connection& c, int sig) {
ScopedSuppressLogging sl;
- kill(n,sig);
try { c.close(); } catch(...) {}
+ kill(n,sig);
}
/**