Socket#connect may be raise ECONNREFUSED

On my environment with `sudo ufw default reject outgoing`,
outgoing packets are filtered without allow rules.
This commit is contained in:
Kazuhiro NISHIYAMA 2024-12-03 13:25:20 +09:00 committed by Kazuhiro NISHIYAMA
parent 9297a4cbc7
commit bbcb094e2d
Notes: git 2024-12-03 04:56:47 +00:00

View File

@ -63,7 +63,11 @@ describe 'Socket#connect' do
client.timeout = 0
-> {
client.connect(address)
begin
client.connect(address)
rescue Errno::ECONNREFUSED
skip "Outgoing packets may be filtered"
end
}.should raise_error(IO::TimeoutError)
end
end