Skip to content

Commit

Permalink
Merge pull request #24 from gotoyuzo/fix-unexecpted-data-conn-drop
Browse files Browse the repository at this point in the history
Removed inappropriate $! reference in Net::FTP
  • Loading branch information
shugo authored Dec 14, 2023
2 parents f5d10ca + a619174 commit edf45f4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/net/ftp.rb
Original file line number Diff line number Diff line change
Expand Up @@ -577,8 +577,9 @@ def transfercmd(cmd, rest_offset = nil) # :nodoc:
if !resp.start_with?("1")
raise FTPReplyError, resp
end
ensure
conn.close if conn && $!
rescue
conn&.close
raise
end
else
sock = makeport
Expand Down

0 comments on commit edf45f4

Please sign in to comment.