From 89551aeaa3f03da2bad01a22a24ec49a846452d8 Mon Sep 17 00:00:00 2001 From: shugo Date: Sat, 26 Nov 2016 09:29:11 +0000 Subject: 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 --- lib/net/ftp.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib') 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 -- cgit v1.2.3