summaryrefslogtreecommitdiff
path: root/receiver.c
diff options
context:
space:
mode:
authorWayne Davison <wayned@samba.org>2010-01-02 10:51:09 -0800
committerWayne Davison <wayned@samba.org>2010-01-02 10:58:39 -0800
commit05c36015f79d0d2975f15b08e31ea72825700f11 (patch)
tree926a7977b092a1b6b30f46edcc7a323df69cf5ce /receiver.c
parente34f43495c0f0ab0e7b01983238f5d6e8988e30b (diff)
downloadrsync-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.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/receiver.c b/receiver.c
index e8fa3d16..6688dda7 100644
--- a/receiver.c
+++ b/receiver.c
@@ -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",