From 9f3da3d3eb5e45adaaa619df03dba8ffc3c7ae5e Mon Sep 17 00:00:00 2001 From: Gordon Sim Date: Wed, 8 Jul 2009 17:28:09 +0000 Subject: Now that broker expects clients to send heartbeats, the client half of an inter-broker link must echo heratbeats (as these are set to the maximum allowed value for such links). git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@792237 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/src/qpid/broker/ConnectionHandler.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'cpp/src/qpid/broker/ConnectionHandler.cpp') diff --git a/cpp/src/qpid/broker/ConnectionHandler.cpp b/cpp/src/qpid/broker/ConnectionHandler.cpp index 1d6c4c9ad8..6de374955b 100644 --- a/cpp/src/qpid/broker/ConnectionHandler.cpp +++ b/cpp/src/qpid/broker/ConnectionHandler.cpp @@ -216,9 +216,14 @@ void ConnectionHandler::Handler::closeOk(){ } void ConnectionHandler::Handler::heartbeat(){ - // Do nothing - the purpose of heartbeats is just to make sure that there is some - // traffic on the connection within the heart beat interval, we check for the - // traffic and don't need to do anything in response to heartbeats + // For general case, do nothing - the purpose of heartbeats is + // just to make sure that there is some traffic on the connection + // within the heart beat interval, we check for the traffic and + // don't need to do anything in response to heartbeats. The + // exception is when we are in fact the client to another broker + // (i.e. an inter-broker link), in which case we echo the + // heartbeat back to the peer + if (!serverMode) proxy.heartbeat(); } void ConnectionHandler::Handler::start(const FieldTable& serverProperties, -- cgit v1.2.1