diff options
author | Gordon Sim <gsim@apache.org> | 2009-07-08 17:28:09 +0000 |
---|---|---|
committer | Gordon Sim <gsim@apache.org> | 2009-07-08 17:28:09 +0000 |
commit | 9f3da3d3eb5e45adaaa619df03dba8ffc3c7ae5e (patch) | |
tree | 73c45d61534113b5ca9355f3b4b312c84e44b276 /cpp/src | |
parent | 7d0d5cffd8ee55f21e6a10e70bf1febd32fc97df (diff) | |
download | qpid-python-9f3da3d3eb5e45adaaa619df03dba8ffc3c7ae5e.tar.gz |
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
Diffstat (limited to 'cpp/src')
-rw-r--r-- | cpp/src/qpid/broker/ConnectionHandler.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
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, |