瀏覽代碼

* Decrease bogus FD if they successfully close

svn: 1911
Bryan Drewery 21 年之前
父節點
當前提交
0d809ddeec
共有 1 個文件被更改,包括 2 次插入0 次删除
  1. 2 0
      src/shell.c

+ 2 - 0
src/shell.c

@@ -127,6 +127,8 @@ void check_maxfiles()
       if (!findanysnum(i))
         if ((close(i)) == -1)			/* try to close the BOGUS fd (likely a KQUEUE) */
           failed_close++;
+        else
+          bogus--;
     if (bogus >= 150 || failed_close >= 50) {
       nuke_server("Max FD reached, restarting...");
       cycle_time = 0;