diff options
author | Andrew Stitcher <astitcher@apache.org> | 2009-06-23 20:02:24 +0000 |
---|---|---|
committer | Andrew Stitcher <astitcher@apache.org> | 2009-06-23 20:02:24 +0000 |
commit | 23157ecf4b305b25f4355e02d0c5f547666d9837 (patch) | |
tree | dd4ba16f95340e75c90e8acd4539c383c2058dcc /cpp | |
parent | 55f8cbf5b379b203a3b26a0f4b6b12919319f1e4 (diff) | |
download | qpid-python-23157ecf4b305b25f4355e02d0c5f547666d9837.tar.gz |
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/qpid@787811 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp')
-rw-r--r-- | cpp/src/qpid/broker/Connection.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/cpp/src/qpid/broker/Connection.cpp b/cpp/src/qpid/broker/Connection.cpp index fb087181a3..c4e8c4335c 100644 --- a/cpp/src/qpid/broker/Connection.cpp +++ b/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(); } |