feat: add stale connection stats tracking and varz exposure
This commit is contained in:
@@ -682,6 +682,12 @@ public sealed class NatsClient : IDisposable
|
||||
break;
|
||||
}
|
||||
|
||||
if (reason == ClientClosedReason.StaleConnection)
|
||||
{
|
||||
Interlocked.Increment(ref _serverStats.StaleConnections);
|
||||
Interlocked.Increment(ref _serverStats.StaleConnectionClients);
|
||||
}
|
||||
|
||||
_logger.LogDebug("Client {ClientId} connection closed: {CloseReason}", Id, reason);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user