diff options
author | shugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-11-26 09:29:11 +0000 |
---|---|---|
committer | shugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-11-26 09:29:11 +0000 |
commit | 473d0d3211b6853deda01891b00076af074b2cb5 (patch) | |
tree | a2a0eac1f791f523816e9fa28caa717beca2b0c6 /lib | |
parent | 631dde2572eb78cbf09d73d23a43852ccb199bd1 (diff) | |
download | ruby-473d0d3211b6853deda01891b00076af074b2cb5.tar.gz |
net/ftp: support timeout for TLS handshake.
Net::FTP inherits ssl_socket_connect from Net::Protocol to implement timeout.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56898 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r-- | lib/net/ftp.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/net/ftp.rb b/lib/net/ftp.rb index 7aac61afe8..1f17e9bdc4 100644 --- a/lib/net/ftp.rb +++ b/lib/net/ftp.rb @@ -77,7 +77,7 @@ module Net # - #rename # - #delete # - class FTP + class FTP < Protocol include MonitorMixin if defined?(OpenSSL::SSL) include OpenSSL @@ -338,7 +338,7 @@ module Net # ProFTPD returns 425 for data connections if session is not reused. ssl_sock.session = @ssl_session end - ssl_sock.connect + ssl_socket_connect(ssl_sock, @open_timeout) if @ssl_context.verify_mode != VERIFY_NONE ssl_sock.post_connection_check(@host) end |