From 6ed2bb2d04f0c1a0692def5384998eb273faca4c Mon Sep 17 00:00:00 2001 From: Andrew Stitcher Date: Tue, 23 Jun 2009 20:02:24 +0000 Subject: Once we're aborting the connection due to traffic timeout make sure we cancel heartbeats git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@787811 13f79535-47bb-0310-9956-ffa450edef68 --- qpid/cpp/src/qpid/broker/Connection.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'qpid/cpp/src') diff --git a/qpid/cpp/src/qpid/broker/Connection.cpp b/qpid/cpp/src/qpid/broker/Connection.cpp index fb087181a3..c4e8c4335c 100644 --- a/qpid/cpp/src/qpid/broker/Connection.cpp +++ b/qpid/cpp/src/qpid/broker/Connection.cpp @@ -52,7 +52,7 @@ struct ConnectionTimeoutTask : public TimerTask { Timer& timer; Connection& connection; AbsTime expires; - + ConnectionTimeoutTask(uint16_t hb, Timer& t, Connection& c) : TimerTask(Duration(hb*2*TIME_SEC)), timer(t), @@ -359,6 +359,11 @@ struct ConnectionHeartbeatTask : public TimerTask { void Connection::abort() { + // Make sure that we don't try to send a heartbeat as we're + // aborting the connection + if (heartbeatTimer) + heartbeatTimer->cancel(); + out.abort(); } -- cgit v1.2.1