Browse Source

* Decrease bogus FD if they successfully close

svn: 1911
Bryan Drewery 21 năm trước cách đây
mục cha
commit
0d809ddeec
1 tập tin đã thay đổi với 2 bổ sung0 xóa
  1. 2 0
      src/shell.c

+ 2 - 0
src/shell.c

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