about summary refs log tree commit homepage
path: root/lib/rainbows/event_machine/response_pipe.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rainbows/event_machine/response_pipe.rb')
-rw-r--r--lib/rainbows/event_machine/response_pipe.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/rainbows/event_machine/response_pipe.rb b/lib/rainbows/event_machine/response_pipe.rb
index 3b584c7..0ea1eae 100644
--- a/lib/rainbows/event_machine/response_pipe.rb
+++ b/lib/rainbows/event_machine/response_pipe.rb
@@ -3,7 +3,7 @@
 module Rainbows::EventMachine::ResponsePipe
   # garbage avoidance, EM always uses this in a single thread,
   # so a single buffer for all clients will work safely
-  BUF = ''
+  RBUF = Rainbows::EvCore::RBUF
 
   def initialize(client)
     @client = client
@@ -11,7 +11,7 @@ module Rainbows::EventMachine::ResponsePipe
 
   def notify_readable
     begin
-      @client.write(@io.read_nonblock(16384, BUF))
+      @client.write(@io.read_nonblock(16384, RBUF))
     rescue Errno::EINTR
     rescue Errno::EAGAIN
       return