From 0e23ba8f1a56308240105712f52341646a5d9969 Mon Sep 17 00:00:00 2001 From: Joseph Henry Date: Thu, 1 Sep 2022 15:16:21 -0700 Subject: [PATCH] Add logic short-circuit to avoid unnecessary bond rebuild logic when appropriate --- node/Bond.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/node/Bond.cpp b/node/Bond.cpp index 86faa4343..0043dc074 100644 --- a/node/Bond.cpp +++ b/node/Bond.cpp @@ -980,6 +980,10 @@ void Bond::curateBond(int64_t now, bool rebuildBond) dumpInfo(now, true); } + if (! _numAliveLinks && ! _numTotalLinks) { + return; + } + /** * Curate the set of paths that are part of the bond proper. Select a set of paths * per logical link according to eligibility and user-specified constraints.