Solve LongPolling races by moving Cts disposal to connection disposal (#2731)

This commit is contained in:
BrennanConroy 2018-08-06 19:17:29 -07:00 committed by GitHub
parent 1874368a5c
commit e403de7fbf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 4 deletions

View File

@ -182,6 +182,8 @@ namespace Microsoft.AspNetCore.Http.Connections.Internal
{
Task disposeTask;
Cancellation?.Dispose();
await StateLock.WaitAsync();
try
{

View File

@ -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