* lib/net/ftp.rb: check the control connection on EPIPE.

Thanks, Simon Williams. [ruby-core:9547]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11638 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
shugo 2007-02-06 02:19:01 +00:00
Родитель 46cceb5a74
Коммит d4d5f27077
2 изменённых файлов: 19 добавлений и 0 удалений

Просмотреть файл

@ -1,3 +1,8 @@
Tue Feb 6 11:18:41 2007 Shugo Maeda <shugo@ruby-lang.org>
* lib/net/ftp.rb: check the control connection on EPIPE.
Thanks, Simon Williams. [ruby-core:9547]
Tue Feb 6 11:03:27 2007 Koichi Sasada <ko1@atdot.net>
* complement last commit.

Просмотреть файл

@ -291,6 +291,13 @@ module Net
putline(cmd)
voidresp
end
rescue Errno::EPIPE
# EPIPE, in this case, means that the data connection was unexpectedly
# terminated. Rather than just raising EPIPE to the caller, check the
# response on the control connection. If getresp doesn't raise a more
# appropriate exception, re-raise the original exception.
getresp
raise
end
def sendport(host, port)
@ -427,6 +434,13 @@ module Net
voidresp
end
end
rescue Errno::EPIPE
# EPIPE, in this case, means that the data connection was unexpectedly
# terminated. Rather than just raising EPIPE to the caller, check the
# response on the control connection. If getresp doesn't raise a more
# appropriate exception, re-raise the original exception.
getresp
raise
end
#