ProcManager: Fix start_delay causing a permanent hang.
Gareth Kirwan [Tue, 2 Aug 2011 09:00:34 +0000 (10:00 +0100)]
ChangeLog
lib/FCGI/ProcManager.pm

index 631199b..c5102e4 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,7 @@
     * ProcManager::Constrained: Add a new FCGI::ProcManager::Constrainted
       subclass which will restart workers safely after a certain number of
       requests, or at certain memory thresholds.
+    * ProcManager: Fix start_delay causing a permanent hang.
 
 0.19 2009-07-22 Gareth Kirwan  <gbjk@cpan.org>
 
index a85e845..ec7c947 100644 (file)
@@ -213,7 +213,7 @@ sub pm_manage {
     last MANAGING_LOOP;
       }
 
-      for (my $s = $this->start_delay(); $s; $s = sleep $s) {};
+      for (my $s = $this->start_delay(); $s > 0; $s -= sleep $s) {};
     }
 
     # this should block until the next server dies.