From 733e48b8178ad146ca54ba515c62f99d1c99e8cb Mon Sep 17 00:00:00 2001 From: Jordan Brown Date: Sat, 29 Sep 2018 15:35:27 -0400 Subject: [PATCH] Moves request cancellation to just after 500 error handling. Everything after this can generate cancelled requests. So, it's best to catch them all. --- src/Tgstation.Server.Host/Core/Application.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Tgstation.Server.Host/Core/Application.cs b/src/Tgstation.Server.Host/Core/Application.cs index 095649224a..589a87a6da 100644 --- a/src/Tgstation.Server.Host/Core/Application.cs +++ b/src/Tgstation.Server.Host/Core/Application.cs @@ -304,6 +304,8 @@ namespace Tgstation.Server.Host.Core ChangeToken.OnChange(configuration.GetReloadToken, () => serverControl.Restart()); applicationBuilder.UseDeveloperExceptionPage(); //it is not worth it to limit this, you should only ever get it if you're an authorized user + + applicationBuilder.UseCancelledRequestSuppression(); applicationBuilder.UseAsyncInitialization(async cancellationToken => { @@ -315,8 +317,6 @@ namespace Tgstation.Server.Host.Core applicationBuilder.UseDbConflictHandling(); - applicationBuilder.UseCancelledRequestSuppression(); - applicationBuilder.UseMvc(); }