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/join_threads.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/rainbows/join_threads.rb') diff --git a/lib/rainbows/join_threads.rb b/lib/rainbows/join_threads.rb index 7ab2004..2ae6aa4 100644 --- a/lib/rainbows/join_threads.rb +++ b/lib/rainbows/join_threads.rb @@ -5,12 +5,12 @@ module Rainbows::JoinThreads # blocking acceptor threads must be forced to run def self.acceptors(threads) - expire = Time.now + Rainbows.server.timeout + expire = Rainbows.now + Rainbows.server.timeout threads.delete_if do |thr| Rainbows.tick begin # blocking accept() may not wake up properly - thr.raise(Errno::EINTR) if Time.now > expire && thr.stop? + thr.raise(Errno::EINTR) if Rainbows.now > expire && thr.stop? thr.run thr.join(0.01) -- cgit v1.2.3-24-ge0c7