fix(lmxproxy): reset probe timer after reconnect to prevent false stale triggers

Without this, the staleness check could fire immediately after reconnect
before the first OnDataChange callback arrives, causing a reconnect loop.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Joseph Doherty
2026-03-24 15:06:42 -04:00
parent 488a7b534b
commit b74e139a85

View File

@@ -243,6 +243,9 @@ namespace ZB.MOM.WW.LmxProxy.Host.MxAccess
if (!IsConnected)
{
await AttemptReconnectAsync(ct);
// Reset probe timer so the next check gives the new connection
// a full interval to deliver its first OnDataChange callback
_lastProbeValueTime = DateTime.UtcNow;
continue;
}
@@ -267,6 +270,7 @@ namespace ZB.MOM.WW.LmxProxy.Host.MxAccess
}
await AttemptReconnectAsync(ct);
_lastProbeValueTime = DateTime.UtcNow;
}
}