From 46b6c62ef8dc04de84601e82c1e86d6d511f9cdc Mon Sep 17 00:00:00 2001 From: Andrew Stitcher Date: Tue, 23 Jun 2009 20:02:13 +0000 Subject: 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 --- cpp/src/qpid/client/ConnectionImpl.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (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 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"); } -- cgit v1.2.1