Parcourir la source

http: skip connection cleanup if we close it anyhow

Suggested in #529794
David Kalnischkies il y a 9 ans
Parent
commit
11c96d7618
1 fichiers modifiés avec 3 ajouts et 0 suppressions
  1. 3 0
      methods/http.cc

+ 3 - 0
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);
 }