From 42747db815ad668b20849afb2a9dcdd1319713ae Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Tue, 2 Nov 2010 12:32:23 -0700 Subject: avoid Errno::EAGAIN, harder Errno::EAGAIN is still a problem under Ruby 1.9.2, so try harder to avoid it and use kgio methods. Even when 1.9.3 is available, kgio will still be faster as exceptions are slower than normal return values. --- lib/rainbows/client.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/rainbows/client.rb') diff --git a/lib/rainbows/client.rb b/lib/rainbows/client.rb index 8956509..dc6d95e 100644 --- a/lib/rainbows/client.rb +++ b/lib/rainbows/client.rb @@ -1,9 +1,9 @@ # -*- encoding: binary -*- # :enddoc: -require 'rainbows/read_timeout' +require 'rainbows/timed_read' class Rainbows::Client < Kgio::Socket - include Rainbows::ReadTimeout + include Rainbows::TimedRead end Kgio.accept_class = Rainbows::Client -- cgit v1.2.3-24-ge0c7