From 32d3b1f052810eb15362d001d1501be0e2da88d8 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sat, 28 Aug 2010 06:50:51 +0000 Subject: "keepalive_timeout 0" (really) disables keepalive Although this behavior is mentioned on the documentation, this was broken under EventMachine, Rev*, and Revactor. Furthermore, we set the "Connection: close" header to allow the client to optimize is handling of non-keepalive connections. --- lib/rainbows/event_machine.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/rainbows/event_machine.rb') diff --git a/lib/rainbows/event_machine.rb b/lib/rainbows/event_machine.rb index 2a41015..cf59cbf 100644 --- a/lib/rainbows/event_machine.rb +++ b/lib/rainbows/event_machine.rb @@ -95,7 +95,8 @@ module Rainbows # long-running async response (response.nil? || -1 == response[0]) and return @state = :close - em_write_response(response, alive = @hp.keepalive? && G.alive) + alive = @hp.keepalive? && G.alive && G.kato > 0 + em_write_response(response, alive) if alive @env.clear @hp.reset -- cgit v1.2.3-24-ge0c7