From 3fa43a1e08a719e65ed38a57b556be0c0edacaef Mon Sep 17 00:00:00 2001 From: Claus Vium Date: Thu, 7 Mar 2019 22:26:23 +0100 Subject: Don't set status code if response is closed --- Emby.Server.Implementations/HttpServer/HttpListenerHost.cs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'Emby.Server.Implementations/HttpServer/HttpListenerHost.cs') diff --git a/Emby.Server.Implementations/HttpServer/HttpListenerHost.cs b/Emby.Server.Implementations/HttpServer/HttpListenerHost.cs index d1b1b5b24..eab755cef 100644 --- a/Emby.Server.Implementations/HttpServer/HttpListenerHost.cs +++ b/Emby.Server.Implementations/HttpServer/HttpListenerHost.cs @@ -225,7 +225,7 @@ namespace Emby.Server.Implementations.HttpServer var httpRes = httpReq.Response; - if (httpRes.IsClosed) + if (httpRes.OriginalResponse.HasStarted) { return; } @@ -595,8 +595,6 @@ namespace Emby.Server.Implementations.HttpServer } finally { - // TODO response closes automatically after the handler is done, but some functions rely on knowing if it's closed or not - httpRes.IsClosed = true; stopWatch.Stop(); var elapsed = stopWatch.Elapsed; if (elapsed.TotalMilliseconds > 500) -- cgit v1.2.3