diff options
| author | shugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-02-06 02:19:01 +0000 |
|---|---|---|
| committer | shugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-02-06 02:19:01 +0000 |
| commit | 4452f448ce7c78fefbc8d7ea89adf4e24c8a8880 (patch) | |
| tree | 896b38e4dd284d5be588e69c7b18f1d0ddd94246 /lib/net | |
| parent | 7886fb252fb543613c7f1d218f5f8b0569883f4a (diff) | |
| download | ruby-4452f448ce7c78fefbc8d7ea89adf4e24c8a8880.tar.gz ruby-4452f448ce7c78fefbc8d7ea89adf4e24c8a8880.tar.xz ruby-4452f448ce7c78fefbc8d7ea89adf4e24c8a8880.zip | |
* lib/net/ftp.rb: check the control connection on EPIPE.
Thanks, Simon Williams. [ruby-core:9547]
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@11638 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/net')
| -rw-r--r-- | lib/net/ftp.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/net/ftp.rb b/lib/net/ftp.rb index fe244f077..26f4da277 100644 --- a/lib/net/ftp.rb +++ b/lib/net/ftp.rb @@ -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 # |
