Skip to content

Commit

Permalink
Fix leaking file descriptor for Ruby 3.4
Browse files Browse the repository at this point in the history
The changes in net-ftp are a brute force way to find issues in the CI. They
might not work, and will probably be reverted.
  • Loading branch information
herwinw committed Dec 31, 2024
1 parent 697c22e commit 5029b6d
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion library/net-ftp/mkdir_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

after :each do
@ftp.quit rescue nil
@ftp.close
@ftp.close rescue nil
@server.stop
end

Expand Down
2 changes: 1 addition & 1 deletion library/net-ftp/mtime_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

after :each do
@ftp.quit rescue nil
@ftp.close
@ftp.close rescue nil
@server.stop
end

Expand Down
2 changes: 1 addition & 1 deletion library/net-ftp/voidcmd_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

after :each do
@ftp.quit rescue nil
@ftp.close
@ftp.close rescue nil
@server.stop
end

Expand Down
2 changes: 2 additions & 0 deletions library/socket/socket/connect_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@
client.connect(address)
rescue Errno::ECONNREFUSED
skip "Outgoing packets may be filtered"
ensure
client.close if client
end
}.should raise_error(IO::TimeoutError)
end
Expand Down

0 comments on commit 5029b6d

Please sign in to comment.