From cd552d04e15fa4a67d0b501a44ec9871e50a0bfd Mon Sep 17 00:00:00 2001 From: Roman Nozdrin Date: Mon, 19 Apr 2021 16:26:51 +0000 Subject: [PATCH] MCOL-4679 Using a correct id creating DEC connections --- dbcon/joblist/distributedenginecomm.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dbcon/joblist/distributedenginecomm.cpp b/dbcon/joblist/distributedenginecomm.cpp index a43f5cd24..a2fd41e1a 100644 --- a/dbcon/joblist/distributedenginecomm.cpp +++ b/dbcon/joblist/distributedenginecomm.cpp @@ -278,9 +278,9 @@ void DistributedEngineComm::Setup() // numConnections must be calculated as number of PMs * number of connections per PM. // This happens earlier in getNumConnections(). - for (unsigned i = 0; i < numConnections; i++) + for (size_t i = 0; i < numConnections; ++i) { - size_t connectionId = numConnections % newPmCount; + size_t connectionId = i % newPmCount; boost::shared_ptr cl(new MessageQueueClient(pmsAddressesAndPorts[connectionId].first, pmsAddressesAndPorts[connectionId].second)); boost::shared_ptr nl(new boost::mutex());