diff options
author | shugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-11-29 02:21:50 +0000 |
---|---|---|
committer | shugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-11-29 02:21:50 +0000 |
commit | 2660dd5b16c43bf7c118f4a37b5a20ef3f2f94de (patch) | |
tree | 967127ddfc3860037c837043eaafd57827f9aa4a /lib | |
parent | 78b0d7ac1c12fc2b561f8dfa1f89c81e8c493809 (diff) | |
download | ruby-2660dd5b16c43bf7c118f4a37b5a20ef3f2f94de.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.rb | 2 |
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 |