diff options
Diffstat (limited to 'cpp/src/qpid/ha/Primary.cpp')
| -rw-r--r-- | cpp/src/qpid/ha/Primary.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/cpp/src/qpid/ha/Primary.cpp b/cpp/src/qpid/ha/Primary.cpp index 5fd7814d62..4208147ff4 100644 --- a/cpp/src/qpid/ha/Primary.cpp +++ b/cpp/src/qpid/ha/Primary.cpp @@ -390,12 +390,16 @@ void Primary::setCatchupQueues(const RemoteBackupPtr& backup, bool createGuards) void Primary::startTx(const boost::shared_ptr<broker::TxBuffer>& tx) { QPID_LOG(trace, logPrefix << "Started TX transaction"); - tx->setObserver(make_shared<PrimaryTxObserver>(boost::ref(haBroker))); + shared_ptr<PrimaryTxObserver> observer(new PrimaryTxObserver(haBroker)); + observer->initialize(); + tx->setObserver(observer); } void Primary::startDtx(const boost::shared_ptr<broker::DtxBuffer>& dtx) { QPID_LOG(trace, logPrefix << "Started DTX transaction"); - dtx->setObserver(make_shared<PrimaryTxObserver>(boost::ref(haBroker))); + shared_ptr<PrimaryTxObserver> observer(new PrimaryTxObserver(haBroker)); + observer->initialize(); + dtx->setObserver(observer); } }} // namespace qpid::ha |
