Allow use of a default MemoryPoolFeature on ConnectionContext (#18579)
This commit is contained in:
parent
5508e7661c
commit
f908247222
|
|
@ -31,7 +31,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal
|
||||||
ConnectionContext = connectionContext,
|
ConnectionContext = connectionContext,
|
||||||
ServiceContext = _serviceContext,
|
ServiceContext = _serviceContext,
|
||||||
ConnectionFeatures = connectionContext.Features,
|
ConnectionFeatures = connectionContext.Features,
|
||||||
MemoryPool = memoryPoolFeature.MemoryPool,
|
MemoryPool = memoryPoolFeature?.MemoryPool ?? System.Buffers.MemoryPool<byte>.Shared,
|
||||||
LocalEndPoint = connectionContext.LocalEndPoint as IPEndPoint,
|
LocalEndPoint = connectionContext.LocalEndPoint as IPEndPoint,
|
||||||
RemoteEndPoint = connectionContext.RemoteEndPoint as IPEndPoint
|
RemoteEndPoint = connectionContext.RemoteEndPoint as IPEndPoint
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal
|
||||||
Protocols = _protocols,
|
Protocols = _protocols,
|
||||||
ServiceContext = _serviceContext,
|
ServiceContext = _serviceContext,
|
||||||
ConnectionFeatures = connectionContext.Features,
|
ConnectionFeatures = connectionContext.Features,
|
||||||
MemoryPool = memoryPoolFeature.MemoryPool,
|
MemoryPool = memoryPoolFeature?.MemoryPool ?? System.Buffers.MemoryPool<byte>.Shared,
|
||||||
Transport = connectionContext.Transport,
|
Transport = connectionContext.Transport,
|
||||||
LocalEndPoint = connectionContext.LocalEndPoint as IPEndPoint,
|
LocalEndPoint = connectionContext.LocalEndPoint as IPEndPoint,
|
||||||
RemoteEndPoint = connectionContext.RemoteEndPoint as IPEndPoint
|
RemoteEndPoint = connectionContext.RemoteEndPoint as IPEndPoint
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue