diff options
Diffstat (limited to 'cpp/src/qpid/cluster/UpdateClient.cpp')
-rw-r--r-- | cpp/src/qpid/cluster/UpdateClient.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/cpp/src/qpid/cluster/UpdateClient.cpp b/cpp/src/qpid/cluster/UpdateClient.cpp index 36efdfba65..17d856b79c 100644 --- a/cpp/src/qpid/cluster/UpdateClient.cpp +++ b/cpp/src/qpid/cluster/UpdateClient.cpp @@ -57,6 +57,7 @@ #include <boost/bind.hpp> #include <boost/cast.hpp> #include <algorithm> +#include <sstream> namespace qpid { namespace cluster { @@ -148,7 +149,7 @@ void UpdateClient::update() { ClusterConnectionProxy(session).expiryId(expiry.getId()); updateManagementAgent(); - + ClusterConnectionMembershipBody membership; map.toMethodBody(membership); AMQFrame frame(membership); @@ -328,6 +329,14 @@ void UpdateClient::updateOutputTask(const sys::OutputTask* task) { void UpdateClient::updateConnection(const boost::intrusive_ptr<Connection>& updateConnection) { QPID_LOG(debug, updaterId << " updating connection " << *updateConnection); + + // Send the management ID first on the main connection. + std::string mgmtId = updateConnection->getBrokerConnection().getMgmtId(); + ClusterConnectionProxy(session).shadowPrepare(mgmtId); + // Make sure its received before opening shadow connection + session.sync(); + + // Open shadow connection and update it. shadowConnection = catchUpConnection(); broker::Connection& bc = updateConnection->getBrokerConnection(); @@ -341,6 +350,7 @@ void UpdateClient::updateConnection(const boost::intrusive_ptr<Connection>& upda ClusterConnectionProxy(shadowConnection).shadowReady( updateConnection->getId().getMember(), updateConnection->getId().getNumber(), + bc.getMgmtId(), bc.getUserId(), string(fragment.first, fragment.second), updateConnection->getOutput().getSendMax() |