From 72a315441937f9e0531112f2b7080da39ca6064d Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Thu, 30 Dec 2010 08:32:24 +0000 Subject: simplify per-client keepalive state checks This lets us simplify repetitive checks worry less about properly maintaining/closing client connections for each concurrency model we support. --- lib/rainbows/response.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'lib/rainbows/response.rb') 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 -- cgit v1.2.3-24-ge0c7