aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorshugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-11-29 02:21:50 +0000
committershugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-11-29 02:21:50 +0000
commita42fc75f9188296bb1dc3efc4f992a3e11aab793 (patch)
tree967127ddfc3860037c837043eaafd57827f9aa4a /lib
parent3db232e8c5fa3b705356b65772d2a0c999819511 (diff)
downloadruby-a42fc75f9188296bb1dc3efc4f992a3e11aab793.tar.gz
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
Diffstat (limited to 'lib')
-rw-r--r--lib/net/ftp.rb2
1 files changed, 1 insertions, 1 deletions
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