diff options
author | Eric Wong <normalperson@yhbt.net> | 2010-11-19 18:39:02 -0800 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2010-11-19 18:39:02 -0800 |
commit | da9dfc1dece4fbcdf2a8e8ccdb4914ce4aa3a998 (patch) | |
tree | 4161062fefbf0539ed50327588b702cda04769f7 /lib/rainbows/revactor.rb | |
parent | c6ffae22748bc22d5ef88fea2a3ca67f480ee74b (diff) | |
download | rainbows-da9dfc1dece4fbcdf2a8e8ccdb4914ce4aa3a998.tar.gz |
Unicorn 3.x includes HttpParser#next? which will reset the parser for keepalive requests without extra steps.
Diffstat (limited to 'lib/rainbows/revactor.rb')
-rw-r--r-- | lib/rainbows/revactor.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/rainbows/revactor.rb b/lib/rainbows/revactor.rb index 9e69251..9569d3e 100644 --- a/lib/rainbows/revactor.rb +++ b/lib/rainbows/revactor.rb @@ -64,12 +64,12 @@ module Rainbows::Revactor if hp.headers? headers = HH.new(headers) range = make_range!(env, status, headers) and status = range.shift - env = hp.keepalive? && G.alive && G.kato > 0 + env = hp.next? && G.alive && G.kato > 0 headers[CONNECTION] = env ? KEEP_ALIVE : CLOSE client.write(response_header(status, headers)) end write_body(client, body, range) - end while env && hp.reset.nil? + end while env rescue ::Revactor::TCP::ReadError rescue => e Rainbows::Error.write(io, e) |