From 3f2ac50fdb042c2c48ebbdc1e70e442f0bf1ab86 Mon Sep 17 00:00:00 2001 From: Gordon Sim Date: Wed, 15 Aug 2007 17:26:43 +0000 Subject: Altered old client channel to use new generated session interface (primarily to reduce the number of places where method bodies are constructed). git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@566274 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/src/qpid/client/ConnectionImpl.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'cpp/src/qpid/client/ConnectionImpl.cpp') diff --git a/cpp/src/qpid/client/ConnectionImpl.cpp b/cpp/src/qpid/client/ConnectionImpl.cpp index 47c01f2d67..e63ac69da6 100644 --- a/cpp/src/qpid/client/ConnectionImpl.cpp +++ b/cpp/src/qpid/client/ConnectionImpl.cpp @@ -47,10 +47,9 @@ void ConnectionImpl::allocated(SessionCore::shared_ptr session) void ConnectionImpl::released(SessionCore::shared_ptr session) { SessionMap::iterator i = sessions.find(session->getId()); - if (i == sessions.end()) { - throw Exception("Id not in use."); + if (i != sessions.end()) { + sessions.erase(i); } - sessions.erase(i); } void ConnectionImpl::handle(framing::AMQFrame& frame) -- cgit v1.2.1