If libuv doesn't unwind gracefully log a warning (#10823)

- We added 3 critical logs to see if there was a resource leak happeing during the loop thread shutdown, turns out that during testing its very common for the thread to not end immediately because of the latency of thread pool dispatching (the latency between queuing and execution of the work item). As a result, we log a warning instead of an error.
This commit is contained in:
David Fowler 2019-06-04 01:20:03 -07:00 committed by GitHub
parent b3ddd65a15
commit 851a1eeb39
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -112,7 +112,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal
Post(t => t.AllowStop());
if (!await WaitAsync(_threadTcs.Task, stepTimeout).ConfigureAwait(false))
{
_log.LogCritical($"{nameof(LibuvThread)}.{nameof(StopAsync)} failed to terminate libuv thread, {nameof(AllowStop)}");
_log.LogWarning($"{nameof(LibuvThread)}.{nameof(StopAsync)} failed to terminate libuv thread, {nameof(AllowStop)}");
Post(t => t.OnStopRude());
if (!await WaitAsync(_threadTcs.Task, stepTimeout).ConfigureAwait(false))