Solve LongPolling races by moving Cts disposal to connection disposal (#2731)
This commit is contained in:
parent
1874368a5c
commit
e403de7fbf
|
|
@ -182,6 +182,8 @@ namespace Microsoft.AspNetCore.Http.Connections.Internal
|
||||||
{
|
{
|
||||||
Task disposeTask;
|
Task disposeTask;
|
||||||
|
|
||||||
|
Cancellation?.Dispose();
|
||||||
|
|
||||||
await StateLock.WaitAsync();
|
await StateLock.WaitAsync();
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -313,10 +313,6 @@ namespace Microsoft.AspNetCore.Http.Connections.Internal
|
||||||
connection.LastSeenUtc = DateTime.UtcNow;
|
connection.LastSeenUtc = DateTime.UtcNow;
|
||||||
|
|
||||||
connection.Status = HttpConnectionStatus.Inactive;
|
connection.Status = HttpConnectionStatus.Inactive;
|
||||||
|
|
||||||
connection.Cancellation?.Cancel();
|
|
||||||
|
|
||||||
connection.Cancellation = null;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue