Initialize Memory2 in ListenerContext

Better than initializing from multiple other classes
This commit is contained in:
Louis DeJardin 2015-09-18 22:31:05 -07:00
parent 13f46bb66b
commit 13defc5a32
3 changed files with 2 additions and 2 deletions

View File

@ -16,7 +16,6 @@ namespace Microsoft.AspNet.Server.Kestrel.Http
protected Listener(ServiceContext serviceContext)
: base(serviceContext)
{
Memory2 = new MemoryPool2();
}
protected UvStreamHandle ListenSocket { get; private set; }

View File

@ -11,11 +11,13 @@ namespace Microsoft.AspNet.Server.Kestrel.Http
{
public ListenerContext()
{
Memory2 = new MemoryPool2();
}
public ListenerContext(ServiceContext serviceContext)
: base(serviceContext)
{
Memory2 = new MemoryPool2();
}
public ListenerContext(ListenerContext listenerContext)

View File

@ -18,7 +18,6 @@ namespace Microsoft.AspNet.Server.Kestrel.Http
{
protected ListenerSecondary(ServiceContext serviceContext) : base(serviceContext)
{
Memory2 = new MemoryPool2();
}
UvPipeHandle DispatchPipe { get; set; }