Merge in 'release/2.2' changes

This commit is contained in:
dotnet-bot 2018-11-17 00:19:01 +00:00
commit 83abe6fb00
1 changed files with 6 additions and 0 deletions

View File

@ -15,7 +15,13 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.Internal
public SocketAwaitableEventArgs WaitForDataAsync()
{
#if NETCOREAPP2_1
_awaitableEventArgs.SetBuffer(Memory<byte>.Empty);
#elif NETSTANDARD2_0
_awaitableEventArgs.SetBuffer(Array.Empty<byte>(), 0, 0);
#else
#error TFMs need to be updated
#endif
if (!_socket.ReceiveAsync(_awaitableEventArgs))
{