From 704f843054f3ca32941d42972a1c7d1b144d06ad Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Mon, 9 May 2011 04:39:54 +0000 Subject: configurator: move validation logic over There's actually no reason we can't have these methods in Rainbows::Configurator where it's easier to document nowadays. --- lib/rainbows/xepoll_thread_pool/client.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/rainbows/xepoll_thread_pool/client.rb') diff --git a/lib/rainbows/xepoll_thread_pool/client.rb b/lib/rainbows/xepoll_thread_pool/client.rb index 1bfb1c2..f871e56 100644 --- a/lib/rainbows/xepoll_thread_pool/client.rb +++ b/lib/rainbows/xepoll_thread_pool/client.rb @@ -3,7 +3,7 @@ # FIXME: lots of duplication from xepolll_thread_spawn/client module Rainbows::XEpollThreadPool::Client - HBUFSIZ = Rainbows.client_header_buffer_size + Rainbows.config!(self, :keepalive_timeout, :client_header_buffer_size) N = Raindrops.new(1) ACCEPTORS = Rainbows::HttpServer::LISTENERS.dup extend Rainbows::WorkerYield @@ -66,7 +66,7 @@ module Rainbows::XEpollThreadPool::Client def self.expire return if ((now = Time.now) - @@last_expire) < 1.0 - if (ot = Rainbows.keepalive_timeout) >= 0 + if (ot = KEEPALIVE_TIMEOUT) >= 0 ot = now - ot defer = [] LOCK.synchronize do @@ -101,7 +101,7 @@ module Rainbows::XEpollThreadPool::Client end def epoll_run(buf) - case kgio_tryread(HBUFSIZ, buf) + case kgio_tryread(CLIENT_HEADER_BUFFER_SIZE, buf) when :wait_readable return kato_set when String -- cgit v1.2.3-24-ge0c7