summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremie Courreges-Anglas <jca@cvs.openbsd.org>2019-10-13 15:09:27 +0000
committerJeremie Courreges-Anglas <jca@cvs.openbsd.org>2019-10-13 15:09:27 +0000
commite77dc45dc3404ae26af1ca45a7610e376cfff54f (patch)
tree88270153abb072e1f8a84fb4ad8de894d788b7a8
parentb53c57c4d0aeac6f8f1aa9737927ff60fff8e4d5 (diff)
Also close the server connection before retrying on a 503.
Keeping it around uses both local and remote resources for no good reason. ok job@
-rw-r--r--usr.bin/ftp/fetch.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.bin/ftp/fetch.c b/usr.bin/ftp/fetch.c
index 6f87ea58a45..c012e951148 100644
--- a/usr.bin/ftp/fetch.c
+++ b/usr.bin/ftp/fetch.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fetch.c,v 1.173 2019/10/13 15:07:13 jca Exp $ */
+/* $OpenBSD: fetch.c,v 1.174 2019/10/13 15:09:26 jca Exp $ */
/* $NetBSD: fetch.c,v 1.14 1997/08/18 10:20:20 lukem Exp $ */
/*-
@@ -945,6 +945,7 @@ noslash:
if (verbose)
fprintf(ttyout, "Retrying %s\n", origline);
retried = 1;
+ ftp_close(&fin, &tls, &fd);
rval = url_get(origline, proxyenv, savefile, lastfile);
}
goto cleanup_url_get;