From 056b4ac41de946caef82ad22caf59aa39db1c3d9 Mon Sep 17 00:00:00 2001 From: Stephen Halter Date: Mon, 4 Apr 2016 17:40:00 -0700 Subject: [PATCH] Never call Thread.Abort - This API isn't available on .NET Core so we should rely entirely on our other methods of terminating the libuv threads. --- .../Infrastructure/KestrelThread.cs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/Microsoft.AspNetCore.Server.Kestrel/Infrastructure/KestrelThread.cs b/src/Microsoft.AspNetCore.Server.Kestrel/Infrastructure/KestrelThread.cs index 2b6d2ab0a5..20183d92da 100644 --- a/src/Microsoft.AspNetCore.Server.Kestrel/Infrastructure/KestrelThread.cs +++ b/src/Microsoft.AspNetCore.Server.Kestrel/Infrastructure/KestrelThread.cs @@ -104,9 +104,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel Post(t => t.OnStopImmediate()); if (!_thread.Join(stepTimeout)) { -#if NET451 - _thread.Abort(); -#endif + _log.LogError(0, null, "KestrelThread.Stop failed to terminate libuv thread."); } } } @@ -116,9 +114,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel // Until we rework this logic, ODEs are bound to happen sometimes. if (!_thread.Join(stepTimeout)) { -#if NET451 - _thread.Abort(); -#endif + _log.LogError(0, null, "KestrelThread.Stop failed to terminate libuv thread."); } } }