about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2014-08-27 01:10:44 +0000
committerEric Wong <e@80x24.org>2014-08-27 01:10:44 +0000
commit0c4e79977ce9e15b33e888ba17b632e8c94122f7 (patch)
tree976d64245bc3aa785211ac6b7bf72cf93ea28522
parenta92a773a6f080c5d640498c02f129122a9a0d76a (diff)
downloadyahns-the_metal.tar.gz
Tested with the following example patch over a slow connection:

  --- a/examples/the_metal.rb
  +++ b/examples/the_metal.rb
  @@ -10,7 +10,7 @@ class Application
       # when write_head is called or have Transfer-Encoding: chunked
       # (in which case res.write must chunk for us)
       res.write_head 200, 'Content-Type' => 'text/plain'
  -    res.write "Hello World\n"
  +    1000000.times { res.write "Hello World\n" }
       res.finish
     end
   end
-rw-r--r--lib/yahns/the_metal.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/yahns/the_metal.rb b/lib/yahns/the_metal.rb
index 4d96bb7..0d7bb43 100644
--- a/lib/yahns/the_metal.rb
+++ b/lib/yahns/the_metal.rb
@@ -38,7 +38,7 @@ class Yahns::TheMetal # :nodoc:
           buf = rv # hope the skb grows when we loop into the trywrite
         when :wait_writable, :wait_readable
           if @wbuf
-            @wbuf = Yahns::Wbuf.new(*@obuf)
+            @wbuf = Yahns::Wbuf.new(*@wbuf)
             @last_rv = @wbuf.wbuf_write(@io, buf) # write-in-full behavior
             return
           else