Result -> GetAwaiter().GetResult() for legacy

This commit is contained in:
Ben Adams 2015-11-13 07:31:12 +00:00
parent 2ac5e4c790
commit 96c1668c54
1 changed files with 1 additions and 1 deletions

View File

@ -66,7 +66,7 @@ namespace Microsoft.AspNet.Server.Kestrel.Http
public override int EndRead(IAsyncResult asyncResult) public override int EndRead(IAsyncResult asyncResult)
{ {
return ((Task<int>)asyncResult).Result; return ((Task<int>)asyncResult).GetAwaiter().GetResult();
} }
private Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken, object state) private Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken, object state)