diff --git a/lib/net/ftp.rb b/lib/net/ftp.rb index c33e867..efc2540 100644 --- a/lib/net/ftp.rb +++ b/lib/net/ftp.rb @@ -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