lib/dtas/buffer.rb in dtas-0.19.0 vs lib/dtas/buffer.rb in dtas-0.20.0
- old
+ new
@@ -1,6 +1,6 @@
-# Copyright (C) 2013-2020 all contributors <dtas-all@nongnu.org>
+# Copyright (C) all contributors <dtas-all@nongnu.org>
# License: GPL-3.0+ <https://www.gnu.org/licenses/gpl-3.0.txt>
# frozen_string_literal: true
require 'io/wait'
require_relative '../dtas'
@@ -43,10 +43,10 @@
@buffer_size ? { "buffer_size" => @buffer_size } : {}
end
def __dst_error(dst, e)
warn "dropping #{dst.inspect} due to error: #{e.message} (#{e.class})"
- dst.close unless dst.closed?
+ dst.close
end
# This will modify targets
# returns one of:
# - :wait_readable