about summary refs log tree commit homepage
path: root/lib/rainbows/revactor/body.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rainbows/revactor/body.rb')
-rw-r--r--lib/rainbows/revactor/body.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/rainbows/revactor/body.rb b/lib/rainbows/revactor/body.rb
index 7bfb5de..9820df3 100644
--- a/lib/rainbows/revactor/body.rb
+++ b/lib/rainbows/revactor/body.rb
@@ -7,7 +7,7 @@ module Rainbows::Revactor::Body
   }
 
   if IO.method_defined?(:sendfile_nonblock)
-    def write_body_file(client, body, range)
+    def write_body_file_sendfile_revactor(client, body, range)
       body = body_to_io(body)
       sock = client.instance_variable_get(:@_io)
       pfx = Revactor::TCP::Socket === client ? :tcp : :unix
@@ -33,6 +33,7 @@ module Rainbows::Revactor::Body
       ensure
         close_if_private(body)
     end
+    ALIASES[:write_body_file] = :write_body_file_sendfile_revactor
   else
     ALIASES[:write_body] = :write_body_each
   end