Query EndPoints once during reset (#2398)

This commit is contained in:
Ben Adams 2018-03-16 02:55:51 -04:00 committed by David Fowler
parent acf7584d13
commit 2527face16
1 changed files with 7 additions and 4 deletions

View File

@ -335,11 +335,14 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http
_statusCode = StatusCodes.Status200OK; _statusCode = StatusCodes.Status200OK;
_reasonPhrase = null; _reasonPhrase = null;
RemoteIpAddress = RemoteEndPoint?.Address; var remoteEndPoint = RemoteEndPoint;
RemotePort = RemoteEndPoint?.Port ?? 0; RemoteIpAddress = remoteEndPoint?.Address;
RemotePort = remoteEndPoint?.Port ?? 0;
var localEndPoint = LocalEndPoint;
LocalIpAddress = localEndPoint?.Address;
LocalPort = localEndPoint?.Port ?? 0;
LocalIpAddress = LocalEndPoint?.Address;
LocalPort = LocalEndPoint?.Port ?? 0;
ConnectionIdFeature = ConnectionId; ConnectionIdFeature = ConnectionId;
HttpRequestHeaders.Reset(); HttpRequestHeaders.Reset();