Skip to content

Commit

Permalink
Merge pull request #26 from ruby/fix-connection-leak-with-non-standar…
Browse files Browse the repository at this point in the history
…d-errors

Fix connection leak when non-StandardError exceptions raise
  • Loading branch information
shugo authored Dec 14, 2023
2 parents 015d803 + 8b4d184 commit 85aff41
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/net/ftp.rb
Original file line number Diff line number Diff line change
Expand Up @@ -577,7 +577,7 @@ def transfercmd(cmd, rest_offset = nil) # :nodoc:
if !resp.start_with?("1")
raise FTPReplyError, resp
end
rescue
rescue Exception
conn&.close
raise
end
Expand Down

0 comments on commit 85aff41

Please sign in to comment.