From 0a10915fff80ff90bdef2a905dfdc589e815aefd Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Wed, 18 Nov 2015 03:58:05 +0000 Subject: bump to unicorn 5.0.1, use monotonic clock The timeout (mis)feature in unicorn uses the monotonic clock if available. We must follow suit to avoid having our timeout functionality completely broken. --- lib/rainbows/process_client.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/rainbows/process_client.rb') diff --git a/lib/rainbows/process_client.rb b/lib/rainbows/process_client.rb index a39d6cd..4bf9878 100644 --- a/lib/rainbows/process_client.rb +++ b/lib/rainbows/process_client.rb @@ -9,7 +9,7 @@ module Rainbows::ProcessClient Rainbows.config!(self, :client_header_buffer_size, :keepalive_timeout) def read_expire - Time.now + KEEPALIVE_TIMEOUT + Rainbows.now + KEEPALIVE_TIMEOUT end # used for reading headers (respecting keepalive_timeout) @@ -18,7 +18,7 @@ module Rainbows::ProcessClient begin case rv = kgio_tryread(CLIENT_HEADER_BUFFER_SIZE, buf) when :wait_readable - return if expire && expire < Time.now + return if expire && expire < Rainbows.now expire ||= read_expire kgio_wait_readable(KEEPALIVE_TIMEOUT) else -- cgit v1.2.3-24-ge0c7