about summary refs log tree commit homepage
path: root/lib/rainbows/epoll/client.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rainbows/epoll/client.rb')
-rw-r--r--lib/rainbows/epoll/client.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/rainbows/epoll/client.rb b/lib/rainbows/epoll/client.rb
index 3ef51b3..924d32f 100644
--- a/lib/rainbows/epoll/client.rb
+++ b/lib/rainbows/epoll/client.rb
@@ -207,7 +207,8 @@ module Rainbows::Epoll::Client
   # this alternates between a push and pull model from the pipe -> client
   # to avoid having too much data in userspace on either end.
   def stream_pipe(pipe)
-    case buf = pipe.tryread
+    buf = ""
+    case buf = pipe.tryread(buf)
     when String
       write(buf)
       if @wr_queue[0]