You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by gs...@apache.org on 2009/07/08 19:28:09 UTC

svn commit: r792237 - /qpid/trunk/qpid/cpp/src/qpid/broker/ConnectionHandler.cpp

Author: gsim
Date: Wed Jul  8 17:28:09 2009
New Revision: 792237

URL: http://svn.apache.org/viewvc?rev=792237&view=rev
Log:
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).


Modified:
    qpid/trunk/qpid/cpp/src/qpid/broker/ConnectionHandler.cpp

Modified: qpid/trunk/qpid/cpp/src/qpid/broker/ConnectionHandler.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/broker/ConnectionHandler.cpp?rev=792237&r1=792236&r2=792237&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/broker/ConnectionHandler.cpp (original)
+++ qpid/trunk/qpid/cpp/src/qpid/broker/ConnectionHandler.cpp Wed Jul  8 17:28:09 2009
@@ -216,9 +216,14 @@
 }
 
 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,



---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:commits-subscribe@qpid.apache.org