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 | 6ed2bb2d04f0c1a0692def5384998eb273faca4c (patch) | |
| tree | e96ccebd7e36ab674b6d9830a455ccdf8fce346c /qpid/cpp/src | |
| parent | 58708b8f55892a5aef43a2618a113d6ac1ece469 (diff) | |
| download | qpid-python-6ed2bb2d04f0c1a0692def5384998eb273faca4c.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@787811 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/src')
| -rw-r--r-- | qpid/cpp/src/qpid/broker/Connection.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
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(); } |
