mirror of
https://github.com/ruby/ruby.git
synced 2025-09-15 16:44:01 +02:00
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:
parent
9297a4cbc7
commit
bbcb094e2d
Notes:
git
2024-12-03 04:56:47 +00:00
1 changed files with 5 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue