This commit is contained in:
Wang Chunlong
2021-03-31 11:56:58 +08:00
parent cf8ea872d3
commit 85b339e6f0
3 changed files with 5 additions and 5 deletions
@@ -237,13 +237,13 @@ namespace MQTTnet.Server
}
}
var clientEndpoint = channelAdapter.Endpoint;
var endpoint = channelAdapter.Endpoint;
await SafeCleanupChannelAsync(channelAdapter).ConfigureAwait(false);
if (clientId != null)
{
await _eventDispatcher.SafeNotifyClientDisconnectedAsync(clientId, disconnectType, clientEndpoint).ConfigureAwait(false);
await _eventDispatcher.SafeNotifyClientDisconnectedAsync(clientId, disconnectType, endpoint).ConfigureAwait(false);
}
}
@@ -19,6 +19,6 @@ namespace MQTTnet.Server
public MqttClientDisconnectType DisconnectType { get; }
public string Endpoint { get; set; }
public string Endpoint { get; }
}
}
@@ -44,7 +44,7 @@ namespace MQTTnet.Server
}
}
public async Task SafeNotifyClientDisconnectedAsync(string clientId, MqttClientDisconnectType disconnectType, string clientEndpoint)
public async Task SafeNotifyClientDisconnectedAsync(string clientId, MqttClientDisconnectType disconnectType, string endpoint)
{
try
{
@@ -54,7 +54,7 @@ namespace MQTTnet.Server
return;
}
await handler.HandleClientDisconnectedAsync(new MqttServerClientDisconnectedEventArgs(clientId, disconnectType, clientEndpoint)).ConfigureAwait(false);
await handler.HandleClientDisconnectedAsync(new MqttServerClientDisconnectedEventArgs(clientId, disconnectType, endpoint)).ConfigureAwait(false);
}
catch (Exception exception)
{