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:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user