Skip to content

Commit

Permalink
setting connection type to passive to improve interoperability
Browse files Browse the repository at this point in the history
Nearly all ftp servers support passive mode, while users behind
restrictive firewalls still sometimes run into trouble with ft active
mode. I propose to make passive mode the default.
  • Loading branch information
dherde committed May 19, 2012
1 parent bab28eb commit a7a096a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/glynn/ftp.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ def sync(local, distant)
private
def connect
Net::FTP.open(host) do |ftp|
ftp.passive = true
ftp.connect(host, port)
ftp.login(username, password)
yield ftp
Expand Down

0 comments on commit a7a096a

Please sign in to comment.