diff options
| author | Bond-009 <bond.009@outlook.com> | 2019-03-07 22:32:01 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-03-07 22:32:01 +0100 |
| commit | 669c48cc8bd6b9023d54a38c8e8b7f4120cb7368 (patch) | |
| tree | e5f05b56f3a5c76d7d03be6fea0eaa15b48dc835 /Emby.Server.Implementations/HttpServer/HttpListenerHost.cs | |
| parent | d1fe24ac92dbe3646494a847d8a92045ddd32f74 (diff) | |
| parent | 3fa43a1e08a719e65ed38a57b556be0c0edacaef (diff) | |
Merge pull request #1065 from cvium/closed_response
Don't set status code if response is closed
Diffstat (limited to 'Emby.Server.Implementations/HttpServer/HttpListenerHost.cs')
| -rw-r--r-- | Emby.Server.Implementations/HttpServer/HttpListenerHost.cs | 4 |
1 files changed, 1 insertions, 3 deletions
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) |
