From 94b23cadc5daa6f66d95cad465a6a3fd1e689a13 Mon Sep 17 00:00:00 2001 From: GHXX Date: Mon, 15 Jan 2024 21:09:17 +0100 Subject: [PATCH] Add missing Close() statement --- SimpleHttpServer/HttpServer.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/SimpleHttpServer/HttpServer.cs b/SimpleHttpServer/HttpServer.cs index 1a78b66..5a16308 100644 --- a/SimpleHttpServer/HttpServer.cs +++ b/SimpleHttpServer/HttpServer.cs @@ -279,6 +279,9 @@ public sealed class HttpServer { await HandleDefaultErrorPageAsync(rc, 500); mainLogger.Fatal($"Caught otherwise uncaught exception while ProcessingRequest:\n{ex}"); } + finally { + rc.ListenerContext.Response.Close(); + } LogRequest(); }