Am I missing the reason why the value of @throttle is documented and at one point treated as hundreths of seconds, but at other points treated as full seconds? If this is just a bug then I propose the attached fix (tests still pass, but no test added explicitely for the fix).
Til -- http://plazes.com/whereis/til | +49 176 20 19 51 69 | http://tils.net
Index: lib/mongrel.rb =================================================================== --- lib/mongrel.rb (revision 949) +++ lib/mongrel.rb (working copy) @@ -222,7 +222,7 @@ @workers.list.each do |worker| worker[:started_on] = Time.now if not worker[:started_on] - if mark - worker[:started_on] > @timeout + @throttle + if mark - worker[:started_on] > @timeout + @throttle/100.0 Mongrel.log(:error, "#{Time.now.httpdate}: Thread #{worker.inspect} is too old, killing.") worker.raise(TimeoutError.new(error_msg)) end @@ -238,7 +238,7 @@ # that much longer. def graceful_shutdown while reap_dead_workers("shutdown") > 0 - Mongrel.log(:error, "#{Time.now.httpdate}: Waiting for [EMAIL PROTECTED] requests to finish, could take [EMAIL PROTECTED] + @throttle} seconds.") + Mongrel.log(:error, "#{Time.now.httpdate}: Waiting for [EMAIL PROTECTED] requests to finish, could take [EMAIL PROTECTED] + @throttle/100.0} seconds.") sleep @timeout / 10 end end
_______________________________________________ Mongrel-users mailing list Mongrel-users@rubyforge.org http://rubyforge.org/mailman/listinfo/mongrel-users