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.
This commit is contained in:
Stephen Halter 2016-04-04 17:40:00 -07:00
parent 151f87e927
commit 056b4ac41d
1 changed files with 2 additions and 6 deletions

View File

@ -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.");
}
}
}