Prevent DebugAssertException from blocks not returned by non-graceful shutdowns (#667).
This commit is contained in:
parent
65f83015e3
commit
cd8e8f0a11
|
|
@ -98,9 +98,9 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Http
|
|||
listener._closed = true;
|
||||
|
||||
listener.ConnectionManager.WalkConnectionsAndClose();
|
||||
}, this);
|
||||
}, this).ConfigureAwait(false);
|
||||
|
||||
await ConnectionManager.WaitForConnectionCloseAsync();
|
||||
await ConnectionManager.WaitForConnectionCloseAsync().ConfigureAwait(false);
|
||||
|
||||
await Thread.PostAsync(state =>
|
||||
{
|
||||
|
|
@ -109,7 +109,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Http
|
|||
{
|
||||
writeReqPool.Dequeue().Dispose();
|
||||
}
|
||||
}, this);
|
||||
}, this).ConfigureAwait(false);
|
||||
}
|
||||
|
||||
Memory.Dispose();
|
||||
|
|
|
|||
|
|
@ -105,7 +105,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Http
|
|||
{
|
||||
// Call base first so the ListenSocket gets closed and doesn't
|
||||
// try to dispatch connections to closed pipes.
|
||||
await base.DisposeAsync();
|
||||
await base.DisposeAsync().ConfigureAwait(false);
|
||||
|
||||
if (Thread.FatalError == null && ListenPipe != null)
|
||||
{
|
||||
|
|
@ -118,7 +118,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Http
|
|||
{
|
||||
dispatchPipe.Dispose();
|
||||
}
|
||||
}, this);
|
||||
}, this).ConfigureAwait(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -173,9 +173,9 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Http
|
|||
listener._closed = true;
|
||||
|
||||
listener.ConnectionManager.WalkConnectionsAndClose();
|
||||
}, this);
|
||||
}, this).ConfigureAwait(false);
|
||||
|
||||
await ConnectionManager.WaitForConnectionCloseAsync();
|
||||
await ConnectionManager.WaitForConnectionCloseAsync().ConfigureAwait(false);
|
||||
|
||||
await Thread.PostAsync(state =>
|
||||
{
|
||||
|
|
@ -185,7 +185,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Http
|
|||
{
|
||||
writeReqPool.Dequeue().Dispose();
|
||||
}
|
||||
}, this);
|
||||
}, this).ConfigureAwait(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue