From 1dde4927f763e943dd99cd8f9db53b646d9b8342 Mon Sep 17 00:00:00 2001 From: Roman Nozdrin Date: Tue, 26 Jan 2021 14:46:18 +0000 Subject: [PATCH] MCOL-4071 BRM::send_recv doesn't wait 10 seconds before re-stablishing the network connection towards workernode --- versioning/BRM/dbrm.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/versioning/BRM/dbrm.cpp b/versioning/BRM/dbrm.cpp index 4aa222bc1..3f59efe4b 100644 --- a/versioning/BRM/dbrm.cpp +++ b/versioning/BRM/dbrm.cpp @@ -877,6 +877,7 @@ int8_t DBRM::send_recv(const ByteStream& in, ByteStream& out) throw() #endif bool firstAttempt = true; + bool secondAttempt = true; mutex.lock(); @@ -926,12 +927,16 @@ reconnect: { cerr << "DBRM::send_recv: controller node closed the connection" << endl; - if (firstAttempt) + if (secondAttempt) { - firstAttempt = false; MessageQueueClientPool::releaseInstance(msgClient); msgClient = NULL; - sleep(10); + if (!firstAttempt) + { + secondAttempt = false; + sleep(3); + } + firstAttempt = false; goto reconnect; }