This commit is contained in:
Pavel Krymets 2018-04-09 16:06:39 -07:00
parent f0eab4410a
commit e32b51d6e6
3 changed files with 7 additions and 7 deletions

View File

@ -29,7 +29,7 @@ namespace Microsoft.AspNetCore.Server.IISIntegration
{ {
if (LocalIpAddress == null) if (LocalIpAddress == null)
{ {
InitializeRemoteEndpoint(); InitializeLocalEndpoint();
} }
return LocalIpAddress; return LocalIpAddress;
} }
@ -56,7 +56,7 @@ namespace Microsoft.AspNetCore.Server.IISIntegration
{ {
if (LocalIpAddress == null) if (LocalIpAddress == null)
{ {
InitializeRemoteEndpoint(); InitializeLocalEndpoint();
} }
return LocalPort; return LocalPort;

View File

@ -111,7 +111,7 @@ namespace Microsoft.AspNetCore.Server.IISIntegration
ResetFeatureCollection(); ResetFeatureCollection();
if (_server.IsWebSocketAvailible(pInProcessHandler)) if (!_server.IsWebSocketAvailible(pInProcessHandler))
{ {
_currentIHttpUpgradeFeature = null; _currentIHttpUpgradeFeature = null;
} }

View File

@ -194,7 +194,7 @@ http_read_request_bytes(
_Out_ BOOL* pfCompletionPending _Out_ BOOL* pfCompletionPending
) )
{ {
HRESULT hr; HRESULT hr = S_OK;
if (pInProcessHandler == NULL) if (pInProcessHandler == NULL)
{ {
@ -206,7 +206,7 @@ http_read_request_bytes(
} }
IHttpRequest *pHttpRequest = (IHttpRequest*)pInProcessHandler->QueryHttpContext()->GetRequest(); IHttpRequest *pHttpRequest = (IHttpRequest*)pInProcessHandler->QueryHttpContext()->GetRequest();
// Check if there is anything to read
if (pHttpRequest->GetRemainingEntityBytes() > 0) if (pHttpRequest->GetRemainingEntityBytes() > 0)
{ {
BOOL fAsync = TRUE; BOOL fAsync = TRUE;
@ -225,8 +225,8 @@ http_read_request_bytes(
} }
else else
{ {
// nothing to read *pdwBytesReceived = 0;
hr = S_OK; *pfCompletionPending = FALSE;
} }
return hr; return hr;