about summary refs log tree commit homepage
diff options
context:
space:
mode:
-rw-r--r--lib/rainbows/http_server.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/rainbows/http_server.rb b/lib/rainbows/http_server.rb
index 746d534..2573032 100644
--- a/lib/rainbows/http_server.rb
+++ b/lib/rainbows/http_server.rb
@@ -27,8 +27,9 @@ class Rainbows::HttpServer < Unicorn::HttpServer
   # connection we accept without wasting cycles.  That added to the
   # fact that we let clients keep idle connections open for long
   # periods of time means we have to chmod at a fixed interval.
-  def timeout=(nr)
-    @timeout = nr + 1
+  def timeout=(seconds)
+    max = 0x7fffffff
+    @timeout = seconds >= max ? max : seconds + 1
   end
 
   def load_config!