ruby-changes:44843
From: shugo <ko1@a...>
Date: Tue, 29 Nov 2016 11:21:56 +0900 (JST)
Subject: [ruby-changes:44843] shugo:r56916 (trunk): net/ftp: close the connection if the TLS handshake timeout is exceeded.
shugo 2016-11-29 11:21:50 +0900 (Tue, 29 Nov 2016) New Revision: 56916 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=56916 Log: net/ftp: close the connection if the TLS handshake timeout is exceeded. Otherwise, file descriptor leaks may occur in Net::FTP.new. Modified files: trunk/lib/net/ftp.rb Index: lib/net/ftp.rb =================================================================== --- lib/net/ftp.rb (revision 56915) +++ lib/net/ftp.rb (revision 56916) @@ -371,7 +371,7 @@ module Net https://github.com/ruby/ruby/blob/trunk/lib/net/ftp.rb#L371 voidcmd("PBSZ 0") voidcmd("PROT P") end - rescue OpenSSL::SSL::SSLError + rescue OpenSSL::SSL::SSLError, OpenTimeout close raise end -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/