From c4d91fab9e005179803a3ab978e8f2896a5a5b16 Mon Sep 17 00:00:00 2001
From: Valery Kharseko <vharseko@3a-systems.ru>
Date: Wed, 28 Oct 2026 16:25:28 +0000
Subject: [PATCH] [#1208] Restart a directory server during the load of the replication convergence run, in rows of its own (#1233)

---
 .github/scripts/replication/monitor.sh |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/.github/scripts/replication/monitor.sh b/.github/scripts/replication/monitor.sh
index 907ad3f..5093148 100644
--- a/.github/scripts/replication/monitor.sh
+++ b/.github/scripts/replication/monitor.sh
@@ -71,10 +71,10 @@
 MONITORING_PERIOD=60
 
 # Three converged samples in a row, the last one started more than a monitoring period (and
-# the publisher's 5 s latch) after the first ended. Sets CONVERGED_IN to the seconds until the
-# first of them
-wait_converged() {
-  local start=$SECONDS hits=0 first= last=
+# the publisher's 5 s latch) after the first ended. Sets CONVERGED_IN to the seconds from
+# <start> (a value of SECONDS, now by default) until the first of them
+wait_converged() { # [<start>]
+  local start=${1:-$SECONDS} hits=0 first= last=
   until [ $hits -ge 3 ] && [ $((last - first)) -gt $((MONITORING_PERIOD + 5)) ]; do
     last=$SECONDS
     if converged_once; then hits=$((hits + 1)); first=${first:-$SECONDS}; else hits=0; first=; fi

--
Gitblit v1.10.0