ソースを参照

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);
 }