From 53928f10c6ec05903e8e801a4c2d5bef155dedd8 Mon Sep 17 00:00:00 2001 From: Jordan Brown Date: Thu, 14 May 2020 14:07:22 -0400 Subject: [PATCH] Fix chat shutdown exception --- src/Tgstation.Server.Host/Components/Chat/ChatManager.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Tgstation.Server.Host/Components/Chat/ChatManager.cs b/src/Tgstation.Server.Host/Components/Chat/ChatManager.cs index 2782f9aba1..94e01c8af5 100644 --- a/src/Tgstation.Server.Host/Components/Chat/ChatManager.cs +++ b/src/Tgstation.Server.Host/Components/Chat/ChatManager.cs @@ -646,7 +646,8 @@ namespace Tgstation.Server.Host.Components.Chat public async Task StopAsync(CancellationToken cancellationToken) { handlerCts.Cancel(); - await chatHandler.ConfigureAwait(false); + if (chatHandler != null) + await chatHandler.ConfigureAwait(false); await Task.WhenAll(providers.Select(x => x.Value).Select(x => x.Disconnect(cancellationToken))).ConfigureAwait(false); }