fix: Improve shutdown process for IRC Gateway and Server Directory services

This commit is contained in:
HueByte
2026-02-19 12:25:33 +01:00
parent 963c6d3384
commit 1bf32450fd
2 changed files with 13 additions and 10 deletions
@@ -177,13 +177,9 @@ public sealed class ServerDirectoryService(
public override async Task StopAsync(CancellationToken cancellationToken)
{
if (_connection is not null)
{
await _connection.DisposeAsync();
_connection = null;
}
// Cancel ExecuteAsync first — it disposes the connection via await using
await base.StopAsync(cancellationToken);
_connection = null;
}
/// <summary>