summary refs log tree commit homepage
path: root/lib/rainbows/client.rb
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2011-02-28 03:10:55 +0000
committerEric Wong <normalperson@yhbt.net>2011-02-28 03:10:55 +0000
commit85784e1b5fca7bbadc7fb5dba1f100785188954f (patch)
treefd50cab35fb68f30a8dbbdbdb9f369398008ea27 /lib/rainbows/client.rb
parent829d58c261ba64bb4f512c6591eba2f468df15a6 (diff)
It's a simpler interface and avoids allocating an array
which is nice.
Diffstat (limited to 'lib/rainbows/client.rb')
-rw-r--r--lib/rainbows/client.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/rainbows/client.rb b/lib/rainbows/client.rb
index 3d92da1..9b65cea 100644
--- a/lib/rainbows/client.rb
+++ b/lib/rainbows/client.rb
@@ -1,5 +1,6 @@
 # -*- encoding: binary -*-
 # :enddoc:
+require "io/wait"
 
 # this class is used for most synchronous concurrency models
 class Rainbows::Client < Kgio::Socket
@@ -8,7 +9,7 @@ class Rainbows::Client < Kgio::Socket
   end
 
   def kgio_wait_readable
-    IO.select([self], nil, nil, Rainbows.keepalive_timeout)
+    wait Rainbows.keepalive_timeout
   end
 
   # used for reading headers (respecting keepalive_timeout)