about summary refs log tree commit homepage
path: root/lib/rainbows.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rainbows.rb')
-rw-r--r--lib/rainbows.rb9
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/rainbows.rb b/lib/rainbows.rb
index a8bfa78..c99b465 100644
--- a/lib/rainbows.rb
+++ b/lib/rainbows.rb
@@ -17,7 +17,7 @@ module Rainbows
   # this struct is only accessed inside workers and thus private to each
   # G.cur may not be used in the network concurrency model
   # :stopdoc:
-  class State < Struct.new(:alive,:m,:cur,:kato,:server,:tmp,:expire)
+  class State < Struct.new(:alive,:m,:cur,:server,:tmp,:expire)
     def tick
       tmp.chmod(self.m = m == 0 ? 1 : 0)
       exit!(2) if expire && Time.now >= expire
@@ -32,7 +32,7 @@ module Rainbows
       false
     end
   end
-  G = State.new(true, 0, 0, 5)
+  G = State.new(true, 0, 0)
   O = {}
   class Response416 < RangeError; end
 
@@ -87,13 +87,16 @@ module Rainbows
     end
 
     # :stopdoc:
-    attr_accessor :max_bytes
+    attr_accessor :max_bytes, :keepalive_timeout
     # :startdoc:
   end
 
   # the default max body size is 1 megabyte (1024 * 1024 bytes)
   @max_bytes = 1024 * 1024
 
+  # the default keepalive_timeout is 5 seconds
+  @keepalive_timeout = 5
+
   # :stopdoc:
   # maps models to default worker counts, default worker count numbers are
   # pretty arbitrary and tuning them to your application and hardware is