瀏覽代碼

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