Преглед изворни кода

http: skip connection cleanup if we close it anyhow

Suggested in #529794
David Kalnischkies пре 9 година
родитељ
комит
11c96d7618
1 измењених фајлова са 3 додато и 0 уклоњено
  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);
 }