From 513fd04d21228519b58fbf10a077a0ff8f6be785 Mon Sep 17 00:00:00 2001 From: Wayne Davison Date: Wed, 27 Apr 2005 22:58:06 +0000 Subject: [PATCH] Set ignore_timeout before starting the transfer, regardless of what protocol level is in effect. This guards against the generator timing out when the output pipe is full and the input pipe (to the receiver) is slow. --- generator.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/generator.c b/generator.c index 262ffe23..a1e56630 100644 --- a/generator.c +++ b/generator.c @@ -1194,8 +1194,11 @@ void generate_files(int f_out, struct file_list *flist, char *local_name) : "enabled"); } - if (protocol_version < 29) - ignore_timeout = 1; + /* Since we often fill up the outgoing socket and then just sit around + * waiting for the other 2 processes to do their thing, we don't want + * to exit on a timeout. If the data stops flowing, the receiver will + * notice that and let us know via the redo pipe (or its closing). */ + ignore_timeout = 1; for (i = 0; i < flist->count; i++) { struct file_struct *file = flist->files[i]; @@ -1241,10 +1244,6 @@ void generate_files(int f_out, struct file_list *flist, char *local_name) ignore_times = 1; make_backups = 0; /* avoid a duplicate backup for inplace processing */ - /* We expect to just sit around now, so don't exit on a timeout. - * If we really get a timeout then the other process should exit. */ - ignore_timeout = 1; - if (verbose > 2) rprintf(FINFO,"generate_files phase=%d\n",phase); -- 2.34.1