summaryrefslogtreecommitdiffstats
path: root/src/pacsync.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/pacsync.c')
-rw-r--r--src/pacsync.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/pacsync.c b/src/pacsync.c
index c2ff4bee..4b1f1b53 100644
--- a/src/pacsync.c
+++ b/src/pacsync.c
@@ -441,6 +441,13 @@ int downloadfiles_forreal(PMList *servers, const char *localpath,
snprintf(completefile, PATH_MAX, "%s/%s", localpath, fn);
rename(output, completefile);
} else if(filedone < 0) {
+ if(!pmo_xfercommand) {
+ if(!strcmp(server->protocol, "ftp") && !pmo_proxyhost) {
+ FtpQuit(control);
+ } else if(!strcmp(server->protocol, "http") || (pmo_proxyhost && strcmp(server->protocol, "file"))) {
+ HttpQuit(control);
+ }
+ }
return(-1);
}
printf("\n");