Improve internal session/connection management and connection takeover.

This commit is contained in:
Christian Kratky
2020-10-30 00:19:30 +01:00
parent c5b7735a2c
commit f9630ef347
3 changed files with 175 additions and 131 deletions
+2 -2
View File
@@ -186,10 +186,10 @@ namespace MQTTnet.Server
return;
}
await _clientSessionsManager.StopAsync().ConfigureAwait(false);
_cancellationTokenSource.Cancel(false);
await _clientSessionsManager.CloseAllConnectionsAsync().ConfigureAwait(false);
foreach (var adapter in _adapters)
{
adapter.ClientHandler = null;