mirror of
https://github.com/RedWizardsLab/EchoHub.git
synced 2026-09-04 16:46:08 +02:00
fix: Improve shutdown process for IRC Gateway and Server Directory services
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user