diff options
Diffstat (limited to 'lib/yahns/wbuf.rb')
-rw-r--r-- | lib/yahns/wbuf.rb | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/yahns/wbuf.rb b/lib/yahns/wbuf.rb index fa39b9b..42776cf 100644 --- a/lib/yahns/wbuf.rb +++ b/lib/yahns/wbuf.rb @@ -30,6 +30,7 @@ require_relative 'wbuf_common' class Yahns::Wbuf # :nodoc: include Yahns::WbufCommon attr_reader :busy + attr_reader :wbuf_persist def initialize(body, persist, tmpdir, busy) @tmpio = nil @@ -71,7 +72,7 @@ class Yahns::Wbuf # :nodoc: # we're all caught up, try to prevent dirty data from getting flushed # to disk if we can help it. - @tmpio = @tmpio.close + wbuf_abort @sf_offset = 0 @busy = false nil @@ -79,7 +80,11 @@ class Yahns::Wbuf # :nodoc: # called by last wbuf_flush def wbuf_close(client) - @tmpio = @tmpio.close if @tmpio + wbuf_abort wbuf_close_common(client) end + + def wbuf_abort + @tmpio = @tmpio.close if @tmpio + end end |