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;
|
||||
|
||||
Cancellation?.Dispose();
|
||||
|
||||
await StateLock.WaitAsync();
|
||||
try
|
||||
{
|
||||
|
|
|
|||
|
|
@ -313,10 +313,6 @@ namespace Microsoft.AspNetCore.Http.Connections.Internal
|
|||
connection.LastSeenUtc = DateTime.UtcNow;
|
||||
|
||||
connection.Status = HttpConnectionStatus.Inactive;
|
||||
|
||||
connection.Cancellation?.Cancel();
|
||||
|
||||
connection.Cancellation = null;
|
||||
}
|
||||
}
|
||||
finally
|
||||
|
|
|
|||
Loading…
Reference in New Issue