aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorshugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-11-29 02:33:34 +0000
committershugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-11-29 02:33:34 +0000
commit0510e5eab6f87a01af817ca235c830c6fd4ce15f (patch)
tree066fd0a7443e98bf79dbd1e50ad90d8bb52583c0 /lib
parent34345f2b1b4a1c8433e7cf56bae5add090315b97 (diff)
downloadruby-0510e5eab6f87a01af817ca235c830c6fd4ce15f.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')
-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 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