Explorar o código

http: skip connection cleanup if we close it anyhow

Suggested in #529794
David Kalnischkies %!s(int64=9) %!d(string=hai) anos
pai
achega
11c96d7618
Modificáronse 1 ficheiros con 3 adicións e 0 borrados
  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);
 }