diff options
Diffstat (limited to 'lib/yahns/wbuf_lite.rb')
-rw-r--r-- | lib/yahns/wbuf_lite.rb | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/yahns/wbuf_lite.rb b/lib/yahns/wbuf_lite.rb index afee1e9..fa52f54 100644 --- a/lib/yahns/wbuf_lite.rb +++ b/lib/yahns/wbuf_lite.rb @@ -7,9 +7,11 @@ require_relative 'wbuf' # This is only used for "proxy_buffering: false" class Yahns::WbufLite < Yahns::Wbuf # :nodoc: attr_reader :busy + attr_writer :req_res def initialize(req_res) - super(nil, :ignore) + alive = req_res.alive + super(nil, alive ? :ignore : false) @req_res = req_res end @@ -35,8 +37,9 @@ class Yahns::WbufLite < Yahns::Wbuf # :nodoc: if @req_res client.hijack_cleanup Thread.current[:yahns_queue].queue_mod(@req_res, Yahns::Queue::QEV_RD) + return :ignore end - :ignore + @wbuf_persist rescue @req_res = @req_res.close if @req_res raise |