diff options
Diffstat (limited to 'lib/yahns/wbuf_lite.rb')
-rw-r--r-- | lib/yahns/wbuf_lite.rb | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/lib/yahns/wbuf_lite.rb b/lib/yahns/wbuf_lite.rb index 8a93ad1..577b4dc 100644 --- a/lib/yahns/wbuf_lite.rb +++ b/lib/yahns/wbuf_lite.rb @@ -68,16 +68,9 @@ class Yahns::WbufLite # :nodoc: @sf_offset += rv # keep going otherwise when :wait_writable, :wait_readable return rv - when nil - # response got truncated, drop the connection - # this may happens when using Rack::File or similar, we can't - # keep the connection alive because we already sent our Content-Length - # header the client would be confused. - @wbuf_persist = false - return wbuf_close(client) else - raise "BUG: rv=#{rv.inspect} " \ - "on tmpio=#{@tmpio.inspect} " \ + raise "BUG: #{rv.nil? ? 'EOF' : rv.inspect} on " + "tmpio.size=#{@tmpio.size} " \ "sf_offset=#@sf_offset sf_count=#@sf_count" end while @sf_count > 0 wbuf_close(client) |