Created
September 6, 2012 05:38
-
-
Save supernullset/3651744 to your computer and use it in GitHub Desktop.
Weird net/ftp behavior
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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