From f4d328aecce32e5e250a02c3823c26e34389f9d4 Mon Sep 17 00:00:00 2001 From: Joseph Doherty Date: Thu, 22 Oct 2026 06:42:18 -0400 Subject: [PATCH] fix(communication): alarm aggregator reconcile tick does not reopen while a backoff reconnect is pending (double subscribe; surfaced by review 2026-10-21 03/R-2 work) --- .../Actors/SiteAlarmAggregatorActor.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ZB.MOM.WW.ScadaBridge.Communication/Actors/SiteAlarmAggregatorActor.cs b/src/ZB.MOM.WW.ScadaBridge.Communication/Actors/SiteAlarmAggregatorActor.cs index 22ef5b05..a8007097 100644 --- a/src/ZB.MOM.WW.ScadaBridge.Communication/Actors/SiteAlarmAggregatorActor.cs +++ b/src/ZB.MOM.WW.ScadaBridge.Communication/Actors/SiteAlarmAggregatorActor.cs @@ -568,7 +568,9 @@ public sealed class SiteAlarmAggregatorActor : ReceiveActor, IWithTimers // A down stream is reopened in preference to fanning out: the reopen's connect // callback seeds by itself, so doing both would double the work. var reopening = false; - if (_streamDown && !_openInFlight) + // Not while a backoff reconnect is already scheduled: the tick used to open a stream + // and the pending ReconnectAlarmStream then opened a second one (a double subscribe). + if (_streamDown && !_openInFlight && !Timers.IsTimerActive(ReconnectTimerKey)) { _log.Info("Site-alarm gRPC stream for {0} was down; reopening on reconcile tick", _siteIdentifier); if (_retryBudgetExhausted)