summaryrefslogtreecommitdiffstats
path: root/lib/libfetch/ftp.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libfetch/ftp.c')
-rw-r--r--lib/libfetch/ftp.c6
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;
OpenPOWER on IntegriCloud