diff options
author | Wayne Davison <wayned@samba.org> | 2010-01-02 10:51:09 -0800 |
---|---|---|
committer | Wayne Davison <wayned@samba.org> | 2010-01-02 10:58:39 -0800 |
commit | 05c36015f79d0d2975f15b08e31ea72825700f11 (patch) | |
tree | 926a7977b092a1b6b30f46edcc7a323df69cf5ce /receiver.c | |
parent | e34f43495c0f0ab0e7b01983238f5d6e8988e30b (diff) | |
download | rsync-05c36015f79d0d2975f15b08e31ea72825700f11.tar.gz |
More --timeout improvements, especially for the receiving side:
- The receiver now sends keep-alive messages to the generator
when it is actively doing work and hasn't sent anything
recently. This ensures that the generator won't timeout
if the receiver is working hard.
- The perform_io() code has improved keep-alive participation.
- Allow the sender to send some keep-alive messages, which
ensures that if it is in a lull, it can probe the socket.
Diffstat (limited to 'receiver.c')
-rw-r--r-- | receiver.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -48,6 +48,7 @@ extern int keep_partial; extern int checksum_len; extern int checksum_seed; extern int inplace; +extern int allowed_lull; extern int delay_updates; extern mode_t orig_umask; extern struct stats stats; @@ -254,6 +255,9 @@ static int receive_data(int f_in, char *fname_r, int fd_r, OFF_T size_r, if (INFO_GTE(PROGRESS, 1)) show_progress(offset, total_size); + if (allowed_lull) + maybe_send_keepalive(time(NULL), MSK_ALLOW_FLUSH | MSK_ACTIVE_RECEIVER); + if (i > 0) { if (DEBUG_GTE(DELTASUM, 3)) { rprintf(FINFO,"data recv %d at %s\n", |