diff options
author | Eric Wong <normalperson@yhbt.net> | 2009-11-07 01:26:04 -0800 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2009-11-07 01:26:04 -0800 |
commit | 60900208616ee5b41716b23215a0fce33bc3eb5a (patch) | |
tree | 0047d36a21234ffe08483379e657aa7e84311337 /lib/rainbows/rev.rb | |
parent | b36235131e0b5517fc5070c02c72be01c4b7f1f9 (diff) | |
download | rainbows-60900208616ee5b41716b23215a0fce33bc3eb5a.tar.gz |
Since the HTTP parser is frozen during app dispatch, there's no point in checking for HTTP keepalive sooner. Of course we check G.alive as late as possible since we could've received a :QUIT signal while app.call was running.
Diffstat (limited to 'lib/rainbows/rev.rb')
-rw-r--r-- | lib/rainbows/rev.rb | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/rainbows/rev.rb b/lib/rainbows/rev.rb index 66f6ed1..0d8b6c9 100644 --- a/lib/rainbows/rev.rb +++ b/lib/rainbows/rev.rb @@ -49,10 +49,9 @@ module Rainbows def app_call begin (@env[RACK_INPUT] = @input).rewind - alive = @hp.keepalive? @env[REMOTE_ADDR] = @remote_addr response = APP.call(@env.update(RACK_DEFAULTS)) - alive &&= G.alive + alive = @hp.keepalive? && G.alive out = [ alive ? CONN_ALIVE : CONN_CLOSE ] if @hp.headers? DeferredResponse.write(self, response, out) |