summaryrefslogtreecommitdiff
path: root/methods/http.cc
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2016-11-11 10:32:31 +0100
committerDavid Kalnischkies <david@kalnischkies.de>2016-11-11 23:40:37 +0100
commit11c96d7618faecc8fab9edfd83b2b2e0afefda3b (patch)
tree345abe23e67a24bd2d741eeb01a87fb41dd5e716 /methods/http.cc
parent324bb34d77a43d1be411c402b2e11f588194439a (diff)
http: skip connection cleanup if we close it anyhow
Suggested in #529794
Diffstat (limited to 'methods/http.cc')
-rw-r--r--methods/http.cc3
1 files changed, 3 insertions, 0 deletions
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);
}