diff options
author | Andrew Stitcher <astitcher@apache.org> | 2010-10-12 16:04:56 +0000 |
---|---|---|
committer | Andrew Stitcher <astitcher@apache.org> | 2010-10-12 16:04:56 +0000 |
commit | 18fe1fa364b7c0fa84d8e5eebdbe246e4c3fadee (patch) | |
tree | 2af9c04fe113765b37c5839bfb88eaedc43efc9a | |
parent | c6621dcb50cb819ee370311ff252134bbcf96c60 (diff) | |
download | qpid-python-18fe1fa364b7c0fa84d8e5eebdbe246e4c3fadee.tar.gz |
Account for seemingly getting reject messages after already getting established
event.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1021820 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | qpid/cpp/src/qpid/client/RdmaConnector.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/qpid/cpp/src/qpid/client/RdmaConnector.cpp b/qpid/cpp/src/qpid/client/RdmaConnector.cpp index 026952bd99..5558e27752 100644 --- a/qpid/cpp/src/qpid/client/RdmaConnector.cpp +++ b/qpid/cpp/src/qpid/client/RdmaConnector.cpp @@ -247,6 +247,8 @@ void RdmaConnector::disconnected() { aio->requestCallback(boost::bind(&RdmaConnector::drained, this)); } +// Bizarrely we seem to get rejected events *after* we've already got a connected event for some peer disconnects +// so we need to check whether the data connection is started or not in here void RdmaConnector::rejected(sys::Poller::shared_ptr, Rdma::Connection::intrusive_ptr, const Rdma::ConnectionParams& cp) { QPID_LOG(debug, "Connection Rejected " << identifier << ": " << cp.maxRecvBufferSize); { @@ -255,7 +257,11 @@ void RdmaConnector::rejected(sys::Poller::shared_ptr, Rdma::Connection::intrusiv if (!polling) return; polling = false; } - connectionStopped(acon); + if (dataConnected) { + disconnected(); + } else { + connectionStopped(acon); + } } void RdmaConnector::dataError(Rdma::AsynchIO&) { |