mirror of
https://github.com/tgstation/tgstation-server.git
synced 2026-08-30 00:22:40 +01:00
Stop the JobManager before the instances jesus christ what was I thinking
This commit is contained in:
@@ -208,10 +208,11 @@ namespace Tgstation.Server.Host.Components
|
||||
/// <inheritdoc />
|
||||
public async Task StopAsync(CancellationToken cancellationToken)
|
||||
{
|
||||
await jobManager.StopAsync(cancellationToken).ConfigureAwait(false);
|
||||
|
||||
using (cancellationToken.Register(() => shutdownCancellationTokenSource.Cancel()))
|
||||
await Task.WhenAll(shutdownTasks).ConfigureAwait(false);
|
||||
await Task.WhenAll(instances.Select(x => x.Value.StopAsync(cancellationToken))).ConfigureAwait(false);
|
||||
await jobManager.StopAsync(cancellationToken).ConfigureAwait(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user