зеркало из https://github.com/github/ruby.git
* lib/net/ftp.rb (transfercmd): Close TCP server socket even if an
exception occur. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46182 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
c968f908e1
Коммит
569ca78e97
|
@ -1,3 +1,8 @@
|
|||
Wed May 28 00:06:18 2014 Tanaka Akira <akr@fsij.org>
|
||||
|
||||
* lib/net/ftp.rb (transfercmd): Close TCP server socket even if an
|
||||
exception occur.
|
||||
|
||||
Tue May 27 23:50:07 2014 Tanaka Akira <akr@fsij.org>
|
||||
|
||||
* lib/cgi/core.rb: Use Tempfile#close(true) instead of Tempfile#unlink
|
||||
|
|
|
@ -420,6 +420,7 @@ module Net
|
|||
end
|
||||
else
|
||||
sock = makeport
|
||||
begin
|
||||
if @resume and rest_offset
|
||||
resp = sendcmd("REST " + rest_offset.to_s)
|
||||
if resp[0] != ?3
|
||||
|
@ -436,8 +437,10 @@ module Net
|
|||
conn.read_timeout = @read_timeout
|
||||
sock.shutdown(Socket::SHUT_WR) rescue nil
|
||||
sock.read rescue nil
|
||||
ensure
|
||||
sock.close
|
||||
end
|
||||
end
|
||||
return conn
|
||||
end
|
||||
private :transfercmd
|
||||
|
|
Загрузка…
Ссылка в новой задаче