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