diff options
author | Eric Wong <normalperson@yhbt.net> | 2009-11-18 00:08:52 -0800 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2009-11-18 00:08:52 -0800 |
commit | 77f930cb64d32b3fac942b462cf4c7a04af730e3 (patch) | |
tree | 6612d92c7d3681f0701969db5060afd6c65c62e0 /lib/rainbows/http_server.rb | |
parent | 02245b9ea8a407ac67a9633119140fa2fd2c561e (diff) | |
download | rainbows-77f930cb64d32b3fac942b462cf4c7a04af730e3.tar.gz |
And change the default to 2 seconds, most clients can render the page and load all URLs within 2 seconds.
Diffstat (limited to 'lib/rainbows/http_server.rb')
-rw-r--r-- | lib/rainbows/http_server.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/rainbows/http_server.rb b/lib/rainbows/http_server.rb index c26285c..da97929 100644 --- a/lib/rainbows/http_server.rb +++ b/lib/rainbows/http_server.rb @@ -68,6 +68,11 @@ module Rainbows @worker_connections = nr end + def keepalive_timeout(nr) + (Integer === nr && nr >= 0) or + raise ArgumentError, "keepalive must be a non-negative Integer" + G.kato = nr + end end end |