diff options
Diffstat (limited to 'test/test_unixserver.rb')
-rw-r--r-- | test/test_unixserver.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/test_unixserver.rb b/test/test_unixserver.rb index 64f71be..c91354d 100644 --- a/test/test_unixserver.rb +++ b/test/test_unixserver.rb @@ -1,4 +1,4 @@ -# Copyright (C) 2013-2016 all contributors <dtas-all@nongnu.org> +# Copyright (C) 2013-2020 all contributors <dtas-all@nongnu.org> # License: GPL-3.0+ <https://www.gnu.org/licenses/gpl-3.0.txt> # frozen_string_literal: true require './test/helper' @@ -21,7 +21,7 @@ class TestUNIXServer < Testcase end def teardown - @clients.each { |io| io.close unless io.closed? } + @clients.each(&:close) if File.exist?(@tmp.path) @tmp.close! else @@ -41,7 +41,7 @@ class TestUNIXServer < Testcase @srv.run_once # nothing msgs = [] clients = [] - client.send("HELLO", Socket::MSG_EOR) + client.send("HELLO", 0) @srv.run_once do |c, msg| clients << c msgs << msg |