Skip to content

Commit a714bf7

Browse files
caolanmAshod
authored andcommitted
rebalanceChildren never returns < 0
so this is dead code Signed-off-by: Caolán McNamara <[email protected]> Change-Id: Ib0bb486fe43722d7c1128bf52396011cc70c92c4
1 parent 05460a4 commit a714bf7

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

wsd/COOLWSD.cpp

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -792,15 +792,7 @@ std::shared_ptr<ChildProcess> getNewChild_Blocks(SocketPoll &destPoll, unsigned
792792
int numPreSpawn = COOLWSD::NumPreSpawnedChildren;
793793
++numPreSpawn; // Replace the one we'll dispatch just now.
794794
LOG_DBG("getNewChild: Rebalancing children to " << numPreSpawn);
795-
if (rebalanceChildren(numPreSpawn) < 0)
796-
{
797-
LOG_DBG("getNewChild: rebalancing of children failed. Scheduling housekeeping to recover.");
798-
799-
COOLWSD::doHousekeeping();
800-
801-
// Let the caller retry after a while.
802-
return nullptr;
803-
}
795+
rebalanceChildren(numPreSpawn);
804796

805797
const auto timeout = std::chrono::milliseconds(ChildSpawnTimeoutMs / 2);
806798
LOG_TRC("Waiting for a new child for a max of " << timeout);

0 commit comments

Comments
 (0)