diff options
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(); } |