From 2391edabefdd80a2b01902191705c7b836bcd6a0 Mon Sep 17 00:00:00 2001 From: Jordan Brown Date: Sat, 18 Aug 2018 02:17:26 -0400 Subject: [PATCH] Stop the JobManager before the instances jesus christ what was I thinking --- src/Tgstation.Server.Host/Components/InstanceManager.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Tgstation.Server.Host/Components/InstanceManager.cs b/src/Tgstation.Server.Host/Components/InstanceManager.cs index cf9a079956..65fb3f981b 100644 --- a/src/Tgstation.Server.Host/Components/InstanceManager.cs +++ b/src/Tgstation.Server.Host/Components/InstanceManager.cs @@ -208,10 +208,11 @@ namespace Tgstation.Server.Host.Components /// 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); } } }