summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/client/ConnectionImpl.cpp
diff options
context:
space:
mode:
authorGordon Sim <gsim@apache.org>2007-08-15 17:26:43 +0000
committerGordon Sim <gsim@apache.org>2007-08-15 17:26:43 +0000
commit3f2ac50fdb042c2c48ebbdc1e70e442f0bf1ab86 (patch)
tree11a8838ed371c23f57391b4a212c57ddb44051ff /cpp/src/qpid/client/ConnectionImpl.cpp
parentfb26cfb87668cd7b87cf7cdea2ca1f8c367de1a2 (diff)
downloadqpid-python-3f2ac50fdb042c2c48ebbdc1e70e442f0bf1ab86.tar.gz
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
Diffstat (limited to 'cpp/src/qpid/client/ConnectionImpl.cpp')
-rw-r--r--cpp/src/qpid/client/ConnectionImpl.cpp5
1 files changed, 2 insertions, 3 deletions
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)