diff options
-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&) { |