summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/client/ConnectionImpl.cpp
diff options
context:
space:
mode:
authorAndrew Stitcher <astitcher@apache.org>2009-06-23 20:02:13 +0000
committerAndrew Stitcher <astitcher@apache.org>2009-06-23 20:02:13 +0000
commit46b6c62ef8dc04de84601e82c1e86d6d511f9cdc (patch)
treed8e3c5a383f031003dd03caf5ec72e57b094a8fc /cpp/src/qpid/client/ConnectionImpl.cpp
parent9706a007aba97c790a781fd9a8d7055058c35084 (diff)
downloadqpid-python-46b6c62ef8dc04de84601e82c1e86d6d511f9cdc.tar.gz
Make sure you close down heartbeatTimer for every close even if you don't
need to do anything else git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@787809 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/client/ConnectionImpl.cpp')
-rw-r--r--cpp/src/qpid/client/ConnectionImpl.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/cpp/src/qpid/client/ConnectionImpl.cpp b/cpp/src/qpid/client/ConnectionImpl.cpp
index f6c7176664..f1379296fd 100644
--- a/cpp/src/qpid/client/ConnectionImpl.cpp
+++ b/cpp/src/qpid/client/ConnectionImpl.cpp
@@ -176,10 +176,11 @@ void ConnectionImpl::idleOut()
void ConnectionImpl::close()
{
- if (!handler.isOpen()) return;
if (heartbeatTask) {
heartbeatTask->cancel();
}
+
+ if (!handler.isOpen()) return;
handler.close();
closed(CLOSE_CODE_NORMAL, "Closed by client");
}