about summary refs log tree commit homepage
path: root/lib/rainbows/response.rb
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2010-12-30 08:32:24 +0000
committerEric Wong <normalperson@yhbt.net>2011-01-04 16:21:17 -0800
commit72a315441937f9e0531112f2b7080da39ca6064d (patch)
treefe310ac81f73605f2e278d8680aaf9eb4e755a71 /lib/rainbows/response.rb
parent1f28534fce2b30bf3099ea0d014b62ac4a3205f0 (diff)
downloadrainbows-72a315441937f9e0531112f2b7080da39ca6064d.tar.gz
This lets us simplify repetitive checks worry less about
properly maintaining/closing client connections for each
concurrency model we support.
Diffstat (limited to 'lib/rainbows/response.rb')
-rw-r--r--lib/rainbows/response.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/rainbows/response.rb b/lib/rainbows/response.rb
index 8be4177..ca381b8 100644
--- a/lib/rainbows/response.rb
+++ b/lib/rainbows/response.rb
@@ -34,7 +34,10 @@ module Rainbows::Response
 
   # called after forking
   def self.setup(klass)
-    Rainbows::G.kato == 0 and KEEP_ALIVE.replace(CLOSE)
+    if 0 == Rainbows::G.kato
+      KEEP_ALIVE.replace(CLOSE)
+      Rainbows::HttpParser.keepalive_requests = 0
+    end
     range_class = body_class = klass
     case Rainbows::Const::RACK_DEFAULTS['rainbows.model']
     when :WriterThreadSpawn