mirror of
https://github.com/dotnet/MQTTnet.git
synced 2026-10-25 23:53:07 +08:00
Add statistics of last sent packets to the _ConnectedClient_.
This commit is contained in:
@@ -120,11 +120,12 @@ namespace MQTTnet.Server
|
||||
await _sessionsSemaphore.WaitAsync().ConfigureAwait(false);
|
||||
try
|
||||
{
|
||||
var now = DateTime.UtcNow;
|
||||
return _sessions.Where(s => s.Value.IsConnected).Select(s => new ConnectedMqttClient
|
||||
{
|
||||
ClientId = s.Value.ClientId,
|
||||
ProtocolVersion = s.Value.ProtocolVersion ?? MqttProtocolVersion.V311
|
||||
ProtocolVersion = s.Value.ProtocolVersion ?? MqttProtocolVersion.V311,
|
||||
LastPacketReceived = s.Value.LastPacketReceived,
|
||||
LastNonKeepAlivePacketReceived = s.Value.LastNonKeepAlivePacketReceived
|
||||
}).ToList();
|
||||
}
|
||||
finally
|
||||
|
||||
Reference in New Issue
Block a user