From 11c96d7618faecc8fab9edfd83b2b2e0afefda3b Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Fri, 11 Nov 2016 10:32:31 +0100 Subject: http: skip connection cleanup if we close it anyhow Suggested in #529794 --- methods/http.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/methods/http.cc b/methods/http.cc index d5a00211f..8d3c569c1 100644 --- a/methods/http.cc +++ b/methods/http.cc @@ -648,6 +648,9 @@ bool HttpServerState::RunData(FileFd * const File) /*}}}*/ bool HttpServerState::RunDataToDevNull() /*{{{*/ { + // no need to clean up if we discard the connection anyhow + if (Persistent == false) + return true; FileFd DevNull("/dev/null", FileFd::WriteOnly); return RunData(&DevNull); } -- cgit v1.2.3