Suppress InvalidParameter errors on respone Dispose for aborted requests.

This commit is contained in:
Chris Ross 2014-09-17 09:22:09 -07:00
parent 5f7c06d0ec
commit c8c6b4e02d
1 changed files with 2 additions and 1 deletions

View File

@ -827,7 +827,8 @@ namespace Microsoft.Net.Http.Server
}
if (statusCode != UnsafeNclNativeMethods.ErrorCodes.ERROR_SUCCESS && statusCode != UnsafeNclNativeMethods.ErrorCodes.ERROR_HANDLE_EOF
// Don't throw for disconnects, we were already finished with the response.
&& statusCode != UnsafeNclNativeMethods.ErrorCodes.ERROR_CONNECTION_INVALID)
&& statusCode != UnsafeNclNativeMethods.ErrorCodes.ERROR_CONNECTION_INVALID
&& statusCode != UnsafeNclNativeMethods.ErrorCodes.ERROR_INVALID_PARAMETER)
{
Exception exception = new IOException(string.Empty, new WebListenerException((int)statusCode));
LogHelper.LogException(_requestContext.Logger, "Dispose", exception);