Author: cctrieloff
Date: Mon Jun  8 01:35:26 2009
New Revision: 782494

URL: http://svn.apache.org/viewvc?rev=782494&view=rev
Log:
Make sure the heartbeat interval is started for the waitForOpen

Modified:
    qpid/trunk/qpid/cpp/src/qpid/client/ConnectionImpl.cpp

Modified: qpid/trunk/qpid/cpp/src/qpid/client/ConnectionImpl.cpp
URL: 
http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/client/ConnectionImpl.cpp?rev=782494&r1=782493&r2=782494&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/client/ConnectionImpl.cpp (original)
+++ qpid/trunk/qpid/cpp/src/qpid/client/ConnectionImpl.cpp Mon Jun  8 01:35:26 
2009
@@ -139,7 +139,6 @@
     connector->setShutdownHandler(this);
     connector->connect(host, port);
     connector->init();
-    handler.waitForOpen();
  
     // Enable heartbeat if requested
     uint16_t heartbeat = static_cast<ConnectionSettings&>(handler).heartbeat;
@@ -150,6 +149,8 @@
         theTimer().add(heartbeatTask);
     }
  
+    handler.waitForOpen();
+
     //enable security layer if one has been negotiated:
     std::auto_ptr<SecurityLayer> securityLayer = handler.getSecurityLayer();
     if (securityLayer.get()) {



---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:[email protected]

Reply via email to