From 2660dd5b16c43bf7c118f4a37b5a20ef3f2f94de Mon Sep 17 00:00:00 2001 From: shugo Date: Tue, 29 Nov 2016 02:21:50 +0000 Subject: net/ftp: close the connection if the TLS handshake timeout is exceeded. Otherwise, file descriptor leaks may occur in Net::FTP.new. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56916 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/net/ftp.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/net') diff --git a/lib/net/ftp.rb b/lib/net/ftp.rb index 1f17e9bdc4..86f972419a 100644 --- a/lib/net/ftp.rb +++ b/lib/net/ftp.rb @@ -371,7 +371,7 @@ module Net voidcmd("PBSZ 0") voidcmd("PROT P") end - rescue OpenSSL::SSL::SSLError + rescue OpenSSL::SSL::SSLError, OpenTimeout close raise end -- cgit v1.2.3