Skip to content

Instantly share code, notes, and snippets.

@supernullset
Created September 6, 2012 05:38
Show Gist options
  • Save supernullset/3651744 to your computer and use it in GitHub Desktop.
Save supernullset/3651744 to your computer and use it in GitHub Desktop.
Weird net/ftp behavior
require 'net/ftp'
ftp_root = "tgftp.nws.noaa.gov"
# Im running conn_test with arbitrary values for n
def conn_test(root, n)
(1..n).to_a.each do |i|
ftp = Net::FTP.new root
begin
ftp.passive
ftp.debug_mode
ftp.login
rescue
puts "That was that"
puts i
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment