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 | d862001d16a4ab7ba9490e99d563fb3d86eb2b3c (patch) | |
tree | 56707d69cc8153d5abfde1b7e8fe5e2ec01f6a0d /cpp/src | |
parent | 4a73c1b04d155a4d6c6e6a7b822aa456f3425689 (diff) | |
download | qpid-python-d862001d16a4ab7ba9490e99d563fb3d86eb2b3c.tar.gz |
Account for seemingly getting reject messages after already getting established
event.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1021820 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src')
-rw-r--r-- | cpp/src/qpid/client/RdmaConnector.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/cpp/src/qpid/client/RdmaConnector.cpp b/cpp/src/qpid/client/RdmaConnector.cpp index 026952bd99..5558e27752 100644 --- a/cpp/src/qpid/client/RdmaConnector.cpp +++ b/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&) { |