diff options
author | shugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-11-29 02:33:34 +0000 |
---|---|---|
committer | shugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-11-29 02:33:34 +0000 |
commit | a4072112b267766843530768c9eaaf5ee4f3fe8d (patch) | |
tree | 066fd0a7443e98bf79dbd1e50ad90d8bb52583c0 /lib/net | |
parent | d8a0f14b583a51eaa1f1c28299d69972a9ec5e47 (diff) | |
download | ruby-a4072112b267766843530768c9eaaf5ee4f3fe8d.tar.gz |
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.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56918 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/net')
-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 86f972419a..4f826c4f09 100644 --- a/lib/net/ftp.rb +++ b/lib/net/ftp.rb @@ -372,7 +372,7 @@ module Net voidcmd("PROT P") end rescue OpenSSL::SSL::SSLError, OpenTimeout - close + @sock.close raise end end |