From: Wayne Davison Date: Wed, 27 Apr 2005 22:58:06 +0000 (+0000) Subject: Set ignore_timeout before starting the transfer, regardless of X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/commitdiff_plain/513fd04d21228519b58fbf10a077a0ff8f6be785?hp=7a16e12207b65010dc2f0c05dc87a9690c9ed87b 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. --- 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);