diff options
author | des <des@FreeBSD.org> | 2000-10-27 11:37:21 +0000 |
---|---|---|
committer | des <des@FreeBSD.org> | 2000-10-27 11:37:21 +0000 |
commit | ea5581599fd86937f5f773c8e66aedd6a3524383 (patch) | |
tree | e15c597e578ca3e7377ddd5c1232e3359e93d832 /lib/libfetch | |
parent | 1b7ba5be364a2f76b050e9b5866f4e856d327f69 (diff) | |
download | FreeBSD-src-ea5581599fd86937f5f773c8e66aedd6a3524383.zip FreeBSD-src-ea5581599fd86937f5f773c8e66aedd6a3524383.tar.gz |
MFS: don't expect result code until you close the data connection
Diffstat (limited to 'lib/libfetch')
-rw-r--r-- | lib/libfetch/ftp.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/libfetch/ftp.c b/lib/libfetch/ftp.c index 5c28804..00b1cf5 100644 --- a/lib/libfetch/ftp.c +++ b/lib/libfetch/ftp.c @@ -389,11 +389,11 @@ _ftp_closefn(void *v) errno = EBADF; return -1; } - io->err = _ftp_chkerr(io->csd); + close(io->dsd); io->dir = -1; - if (close(io->dsd) == -1) - return -1; io->dsd = -1; + DEBUG(fprintf(stderr, "Waiting for final status\n")); + io->err = _ftp_chkerr(io->csd); close(io->csd); io->csd = -1; return io->err ? -1 : 0; |