From c8c6b4e02ddb1aeae270b039fc3ff29126a547f2 Mon Sep 17 00:00:00 2001 From: Chris Ross Date: Wed, 17 Sep 2014 09:22:09 -0700 Subject: [PATCH] Suppress InvalidParameter errors on respone Dispose for aborted requests. --- .../RequestProcessing/ResponseStream.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Microsoft.Net.Http.Server/RequestProcessing/ResponseStream.cs b/src/Microsoft.Net.Http.Server/RequestProcessing/ResponseStream.cs index 6b428a29d5..94c20b00d1 100644 --- a/src/Microsoft.Net.Http.Server/RequestProcessing/ResponseStream.cs +++ b/src/Microsoft.Net.Http.Server/RequestProcessing/ResponseStream.cs @@ -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);