Merge branch 'release' into dev

This commit is contained in:
Chris Ross 2014-10-24 12:25:49 -07:00
commit 75caf72cb3
2 changed files with 15 additions and 2 deletions

View File

@ -64,6 +64,11 @@ namespace Microsoft.AspNet.Server.WebListener
} }
} }
internal static void LogVerbose(ILogger logger, string location, Exception exception)
{
LogVerbose(logger, location + "; " + exception.ToString());
}
internal static void LogException(ILogger logger, string location, Exception exception) internal static void LogException(ILogger logger, string location, Exception exception)
{ {
if (logger == null) if (logger == null)

View File

@ -123,8 +123,15 @@ namespace Microsoft.AspNet.Server.WebListener
} }
catch (Exception exception) catch (Exception exception)
{ {
LogHelper.LogException(_logger, "ListenForNextRequestAsync", exception); Contract.Assert(_stopping);
Contract.Assert(!_listener.IsListening); if (_stopping)
{
LogHelper.LogVerbose(_logger, "ListenForNextRequestAsync-Stopping", exception);
}
else
{
LogHelper.LogException(_logger, "ListenForNextRequestAsync", exception);
}
return; return;
} }
try try
@ -197,6 +204,7 @@ namespace Microsoft.AspNet.Server.WebListener
public void Dispose() public void Dispose()
{ {
LogHelper.LogInfo(_logger, "Stop");
_stopping = true; _stopping = true;
// Wait for active requests to drain // Wait for active requests to drain
if (_outstandingRequests > 0) if (_outstandingRequests > 0)