Просмотр исходного кода

Release pins before disposal for refused requests (#29026)

Chris Ross 5 лет назад
Родитель
Сommit
41da340fae

+ 1 - 0
src/Servers/HttpSys/src/MessagePump.cs

@@ -193,6 +193,7 @@ namespace Microsoft.AspNetCore.Server.HttpSys
                     if (!Listener.ValidateRequest(requestContext))
                     {
                         // Dispose the request
+                        requestContext.ReleasePins();
                         requestContext.Dispose();
 
                         // If either of these is false then a response has already been sent to the client, so we can accept the next request

+ 1 - 0
src/Servers/HttpSys/test/FunctionalTests/Listener/Utilities.cs

@@ -128,6 +128,7 @@ namespace Microsoft.AspNetCore.Server.HttpSys.Listener
                         return requestContext;
                     }
 
+                    requestContext.ReleasePins();
                     requestContext.Dispose();
                 }
             }