From 832a2908c52cf00488361993085867de34dd6335 Mon Sep 17 00:00:00 2001 From: "Carl C. Trieloff" Date: Mon, 8 Jun 2009 01:35:26 +0000 Subject: Make sure the heartbeat interval is started for the waitForOpen git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@782494 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/src/qpid/client/ConnectionImpl.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'cpp/src/qpid/client/ConnectionImpl.cpp') diff --git a/cpp/src/qpid/client/ConnectionImpl.cpp b/cpp/src/qpid/client/ConnectionImpl.cpp index 6639f92324..f6c7176664 100644 --- a/cpp/src/qpid/client/ConnectionImpl.cpp +++ b/cpp/src/qpid/client/ConnectionImpl.cpp @@ -139,7 +139,6 @@ void ConnectionImpl::open() connector->setShutdownHandler(this); connector->connect(host, port); connector->init(); - handler.waitForOpen(); // Enable heartbeat if requested uint16_t heartbeat = static_cast(handler).heartbeat; @@ -150,6 +149,8 @@ void ConnectionImpl::open() theTimer().add(heartbeatTask); } + handler.waitForOpen(); + //enable security layer if one has been negotiated: std::auto_ptr securityLayer = handler.getSecurityLayer(); if (securityLayer.get()) { -- cgit v1.2.1