diff options
author | Alan Conway <aconway@apache.org> | 2010-03-15 20:08:10 +0000 |
---|---|---|
committer | Alan Conway <aconway@apache.org> | 2010-03-15 20:08:10 +0000 |
commit | f1376af1bf413c04057879780c3e89c9176eba8a (patch) | |
tree | f9e9ce58f38a1e28c8f34b0c2355c67ad611f0e1 /cpp/src/qpid/cluster/UpdateClient.cpp | |
parent | ab3cb1b00b0bcbaa2a69d6415d384d0c6a9f6e4f (diff) | |
download | qpid-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/qpid/cluster/UpdateClient.cpp')
-rw-r--r-- | cpp/src/qpid/cluster/UpdateClient.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/cpp/src/qpid/cluster/UpdateClient.cpp b/cpp/src/qpid/cluster/UpdateClient.cpp index 17d856b79c..ab992bf8cf 100644 --- a/cpp/src/qpid/cluster/UpdateClient.cpp +++ b/cpp/src/qpid/cluster/UpdateClient.cpp @@ -158,6 +158,12 @@ void UpdateClient::update() { connection.close(); QPID_LOG(debug, updaterId << " update completed to " << updateeId << " at " << updateeUrl << ": " << membership); + // FIXME aconway 2010-03-15: This sleep avoids the race condition + // described in // https://bugzilla.redhat.com/show_bug.cgi?id=568831. + // It allows the connection to fully close before destroying the + // Connection object. Remove when the bug is fixed. + // + sys::usleep(10*1000); // 100ms } namespace { |