The branch, master has been updated
       via  e461cef Avoid useless keepalive msgs that would kill an older rsync.
      from  18217a9 Fix timeout checking in safe_read().

;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit e461cefbabd6ae82ed5aa6686d0d118931b8fdc8
Author: Wayne Davison <way...@samba.org>
Date:   Sun Nov 10 16:15:30 2013 -0800

    Avoid useless keepalive msgs that would kill an older rsync.
    
    This fix avoids the sending of keep-alive messages from the receiver
    to the sender when we are still sending the file list (at which time
    an older rsync would die if it received such a keep-alive message).
    The messages aren't actually needed, since we haven't forked yet, and
    the single flow of data keeps the procs alive.

-----------------------------------------------------------------------

Summary of changes:
 io.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/io.c b/io.c
index 2a87919..c5b1ebc 100644
--- a/io.c
+++ b/io.c
@@ -1371,6 +1371,14 @@ void maybe_send_keepalive(time_t now, int flags)
        if (flags & MSK_ACTIVE_RECEIVER)
                last_io_in = now; /* Fudge things when we're working hard on 
the files. */
 
+       /* Early in the transfer (before the receiver forks) the receiving side 
doesn't
+        * care if it hasn't sent data in a while as long as it is receiving 
data (in
+        * fact, a pre-3.1.0 rsync would die if we tried to send it a keep 
alive during
+        * this time).  So, if we're an early-receiving proc, just return and 
let the
+        * incoming data determine if we timeout. */
+       if (!am_sender && !am_receiver && !am_generator)
+               return;
+
        if (now - last_io_out >= allowed_lull) {
                /* The receiver is special:  it only sends keep-alive messages 
if it is
                 * actively receiving data.  Otherwise, it lets the generator 
timeout. */


-- 
The rsync repository.
_______________________________________________
rsync-cvs mailing list
rsync-cvs@lists.samba.org
https://lists.samba.org/mailman/listinfo/rsync-cvs

Reply via email to