ruby-changes:44845
From: shugo <ko1@a...>
Date: Tue, 29 Nov 2016 11:33:38 +0900 (JST)
Subject: [ruby-changes:44845] shugo:r56918 (trunk): net/ftp: close the socket directly when an error occurs during TLS handshake.
shugo 2016-11-29 11:33:34 +0900 (Tue, 29 Nov 2016) New Revision: 56918 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=56918 Log: net/ftp: close the socket directly when an error occurs during TLS handshake. Otherwise, @sock.read in Net::FTP#close hungs until read_timeout exceeded. Modified files: trunk/lib/net/ftp.rb Index: lib/net/ftp.rb =================================================================== --- lib/net/ftp.rb (revision 56917) +++ lib/net/ftp.rb (revision 56918) @@ -372,7 +372,7 @@ module Net https://github.com/ruby/ruby/blob/trunk/lib/net/ftp.rb#L372 voidcmd("PROT P") end rescue OpenSSL::SSL::SSLError, OpenTimeout - close + @sock.close raise end end -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/