diff options
Diffstat (limited to 'cpp/src/qpid/broker/Connection.cpp')
-rw-r--r-- | cpp/src/qpid/broker/Connection.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/cpp/src/qpid/broker/Connection.cpp b/cpp/src/qpid/broker/Connection.cpp index ca0ca20849..f981d47ef7 100644 --- a/cpp/src/qpid/broker/Connection.cpp +++ b/cpp/src/qpid/broker/Connection.cpp @@ -28,9 +28,10 @@ #include "BrokerAdapter.h" #include "SemanticHandler.h" -#include <boost/utility/in_place_factory.hpp> #include <boost/bind.hpp> +#include <algorithm> + using namespace boost; using namespace qpid::sys; using namespace qpid::framing; @@ -61,6 +62,7 @@ void Connection::close( ReplyCode code, const string& text, ClassId classId, MethodId methodId) { adapter.close(code, text, classId, methodId); + channels.clear(); getOutput().close(); } @@ -73,8 +75,11 @@ void Connection::idleOut(){} void Connection::idleIn(){} -void Connection::closed(){ +void Connection::closed(){ // Physically closed, suspend open sessions. try { + std::for_each( + channels.begin(), channels.end(), + boost::bind(&SessionHandler::localSuspend, _1)); while (!exclusiveQueues.empty()) { Queue::shared_ptr q(exclusiveQueues.front()); q->releaseExclusiveOwnership(); |