Merge+rename+rename resolve

This commit is contained in:
Ben Adams 2016-01-26 02:24:44 +00:00
parent 9f2d685cbf
commit 00b8a13b55
5 changed files with 9 additions and 11 deletions

View File

@ -312,10 +312,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Http
}
}
await ProduceStartAndFireOnStarting();
// Force flush
await SocketOutput.WriteAsync(_emptyData);
await FlushAsync(CancellationToken.None);
return DuplexStream;
}

View File

@ -5,7 +5,7 @@ using System;
using System.IO;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.AspNet.Server.Kestrel.Infrastructure;
using Microsoft.AspNetCore.Server.Kestrel.Infrastructure;
namespace Microsoft.AspNetCore.Server.Kestrel.Http
{

View File

@ -5,7 +5,7 @@ using System;
using System.IO;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.AspNet.Server.Kestrel.Infrastructure;
using Microsoft.AspNetCore.Server.Kestrel.Infrastructure;
namespace Microsoft.AspNetCore.Server.Kestrel.Http
{

View File

@ -155,7 +155,7 @@ namespace Microsoft.AspNetCore.Server.KestrelTests
var halfWriteBehindBuffer = new ArraySegment<byte>(data, 0, bufferSize);
// Act
var writeTask1 = socketOutput.WriteAsync(halfWriteBehindBuffer);
var writeTask1 = socketOutput.WriteAsync(halfWriteBehindBuffer, CancellationToken.None);
// Assert
// The first write should pre-complete since it is <= _maxBytesPreCompleted.
Assert.Equal(TaskStatus.RanToCompletion, writeTask1.Status);
@ -168,7 +168,7 @@ namespace Microsoft.AspNetCore.Server.KestrelTests
socketOutput.ProducingComplete(iter);
// Act
var writeTask2 = socketOutput.WriteAsync(halfWriteBehindBuffer);
var writeTask2 = socketOutput.WriteAsync(halfWriteBehindBuffer, CancellationToken.None);
// Assert
// Too many bytes are already pre-completed for the fourth write to pre-complete.
Assert.True(writeRequestedWh.Wait(1000));

View File

@ -1,8 +1,9 @@
using System;
using System.Threading;
using Microsoft.AspNet.Server.Kestrel.Http;
using Microsoft.AspNet.Server.Kestrel.Networking;
using Microsoft.AspNetCore.Server.Kestrel.Networking;
using Microsoft.AspNetCore.Server.Kestrel.Http;
namespace Microsoft.AspNet.Server.KestrelTests.TestHelpers
namespace Microsoft.AspNetCore.Server.KestrelTests.TestHelpers
{
public class MockConnection : Connection
{