From a5986295bfb7bd7c44c863e4670f16481097c7fc Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Fri, 19 Nov 2010 18:55:06 -0800 Subject: revactor: fix braindamaged commit/coding style Oops, last commit was rushed --- lib/rainbows/revactor.rb | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'lib/rainbows/revactor.rb') diff --git a/lib/rainbows/revactor.rb b/lib/rainbows/revactor.rb index 9569d3e..59f37b0 100644 --- a/lib/rainbows/revactor.rb +++ b/lib/rainbows/revactor.rb @@ -43,6 +43,7 @@ module Rainbows::Revactor end hp = Unicorn::HttpParser.new buf = hp.buf + alive = false begin until env = hp.parse @@ -64,12 +65,12 @@ module Rainbows::Revactor if hp.headers? headers = HH.new(headers) range = make_range!(env, status, headers) and status = range.shift - env = hp.next? && G.alive && G.kato > 0 - headers[CONNECTION] = env ? KEEP_ALIVE : CLOSE + alive = hp.next? && G.alive && G.kato > 0 + headers[CONNECTION] = alive ? KEEP_ALIVE : CLOSE client.write(response_header(status, headers)) end write_body(client, body, range) - end while env + end while alive rescue ::Revactor::TCP::ReadError rescue => e Rainbows::Error.write(io, e) -- cgit v1.2.3-24-ge0c7