about summary refs log tree commit homepage
path: root/lib/rainbows/epoll/response_pipe.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rainbows/epoll/response_pipe.rb')
-rw-r--r--lib/rainbows/epoll/response_pipe.rb7
1 files changed, 1 insertions, 6 deletions
diff --git a/lib/rainbows/epoll/response_pipe.rb b/lib/rainbows/epoll/response_pipe.rb
index 08731b1..56d9a47 100644
--- a/lib/rainbows/epoll/response_pipe.rb
+++ b/lib/rainbows/epoll/response_pipe.rb
@@ -27,11 +27,6 @@ class Rainbows::Epoll::ResponsePipe
   end
 
   def tryread
-    io = @io
-    io.respond_to?(:kgio_tryread) and return io.kgio_tryread(16384, RBUF)
-    io.read_nonblock(16384, RBUF)
-    rescue Errno::EAGAIN
-      :wait_readable
-    rescue EOFError
+    Kgio.tryread(@io, 16384, RBUF)
   end
 end