diff options
-rw-r--r-- | lib/yahns/proxy_http_response.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/yahns/proxy_http_response.rb b/lib/yahns/proxy_http_response.rb index 0e72d3a..a23c21d 100644 --- a/lib/yahns/proxy_http_response.rb +++ b/lib/yahns/proxy_http_response.rb @@ -186,7 +186,6 @@ module Yahns::HttpResponse # :nodoc: def proxy_response_finish(kcar, wbuf, req_res) rbuf = Thread.current[:yahns_rbuf] - alive = wbuf.wbuf_persist if len = kcar.body_bytes_left # known Content-Length case tmp = req_res.kgio_tryread(0x2000, rbuf) @@ -232,6 +231,7 @@ module Yahns::HttpResponse # :nodoc: else # no Content-Length or Transfer-Encoding: chunked, wait on EOF! + alive = wbuf.wbuf_persist case tmp = req_res.kgio_tryread(0x2000, rbuf) when String tmp = chunk_out(tmp) if alive @@ -247,7 +247,7 @@ module Yahns::HttpResponse # :nodoc: end busy = wbuf.busy and return proxy_busy_mod_blocked(wbuf, busy) - proxy_busy_mod_done(alive) # returns nil + proxy_busy_mod_done(wbuf.wbuf_persist) # returns nil end def proxy_wait_next(qflags) |