Skip to content

Commit f18e101

Browse files
davidrohrlkrcal
authored andcommitted
Improve error handling of 99283b6, throw only in case of TfBuilder not TfScheduler
1 parent 64f27a1 commit f18e101

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

src/TfScheduler/TfSchedulerConnManager.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ bool TfSchedulerConnManager::start()
3030
{
3131
using namespace std::chrono_literals;
3232

33-
if (!mStfSenderRpcClients.start()) {
33+
if (!mStfSenderRpcClients.start(false)) {
3434
return false; // we'll be called back
3535
}
3636

src/common/rpc/StfSenderRpcClient.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ class StfSenderRpcClientCollection {
188188

189189
~StfSenderRpcClientCollection() { if (mRunning) { stop(); } }
190190

191-
bool start()
191+
bool start(bool failOnError = true)
192192
{
193193
using namespace std::chrono_literals;
194194
const auto &lPartId = mDiscoveryConfig->status().partition().partition_id();
@@ -281,7 +281,9 @@ class StfSenderRpcClientCollection {
281281
IDDLOG(lMsg, lConnWorking, getNumConnectedClients() - getNumWorkingClients());
282282
} else {
283283
EDDLOG(lMsg, lConnWorking, getNumConnectedClients() - getNumWorkingClients());
284-
throw std::runtime_error("TfBuilder could not connect to all FLPs, terminating");
284+
if (failOnError) {
285+
throw std::runtime_error("TfBuilder could not connect to all FLPs, terminating");
286+
}
285287
}
286288

287289
// only continue when all connections are established

0 commit comments

Comments
 (0)