feat(lmxproxy): add Connected Since and Reconnect Count to status page

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Joseph Doherty
2026-03-24 13:32:46 -04:00
parent 73fe618953
commit 488a7b534b
8 changed files with 29 additions and 2 deletions

View File

@@ -97,6 +97,9 @@ namespace ZB.MOM.WW.LmxProxy.Host.MxAccess
get { lock (_lock) { return _connectedSince; } }
}
/// <summary>Gets the number of times the client has reconnected since startup.</summary>
public int ReconnectCount => _reconnectCount;
// ── Internal synchronous methods ──────────
private void ConnectInternal()
@@ -278,7 +281,8 @@ namespace ZB.MOM.WW.LmxProxy.Host.MxAccess
try
{
await ConnectAsync(ct);
Log.Information("Reconnected to MxAccess successfully");
Interlocked.Increment(ref _reconnectCount);
Log.Information("Reconnected to MxAccess successfully (reconnect #{Count})", _reconnectCount);
}
catch (OperationCanceledException)
{