about summary refs log tree commit homepage
path: root/lib/yahns/proxy_pass.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/yahns/proxy_pass.rb')
-rw-r--r--lib/yahns/proxy_pass.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/yahns/proxy_pass.rb b/lib/yahns/proxy_pass.rb
index 09fb884..ec1fbcf 100644
--- a/lib/yahns/proxy_pass.rb
+++ b/lib/yahns/proxy_pass.rb
@@ -108,7 +108,7 @@ class Yahns::ProxyPass # :nodoc:
           when Array
             vec = rv # partial write, retry in case loop
           when :wait_writable
-            buf = detach_rbuf!
+            detach_rbuf!
             req[0] = vec
             return :wait_writable
           when nil
@@ -120,13 +120,14 @@ class Yahns::ProxyPass # :nodoc:
         # note: we do not send any trailer, they are folded into the header
         # because this relies on full request buffering
         send_req_buf("0\r\n\r\n".freeze)
+        # prepare_wait_readable already called by send_req_buf
       else # identity request, easy:
         while input.read(0x2000, buf)
           case rv = kgio_trywrite(buf)
           when String
             buf = rv # partial write, retry in case loop
           when :wait_writable
-            buf = detach_rbuf!
+            detach_rbuf!
             req[0] = buf
             return :wait_writable
           when nil