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 /generator.c | |
parent | e34f43495c0f0ab0e7b01983238f5d6e8988e30b (diff) | |
download | android_external_rsync-05c36015f79d0d2975f15b08e31ea72825700f11.tar.gz android_external_rsync-05c36015f79d0d2975f15b08e31ea72825700f11.tar.bz2 android_external_rsync-05c36015f79d0d2975f15b08e31ea72825700f11.zip |
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 'generator.c')
-rw-r--r-- | generator.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/generator.c b/generator.c index 33b7ce2a..e7c1ef7d 100644 --- a/generator.c +++ b/generator.c @@ -289,7 +289,7 @@ static void delete_in_dir(char *fbuf, struct file_struct *file, dev_t *fs_dev) rprintf(FINFO, "delete_in_dir(%s)\n", fbuf); if (allowed_lull) - maybe_send_keepalive(time(NULL), True); + maybe_send_keepalive(time(NULL), MSK_ALLOW_FLUSH); if (io_error && !ignore_errors) { if (already_warned) @@ -1928,7 +1928,7 @@ static void touch_up_dirs(struct file_list *flist, int ndx) } if (counter >= loopchk_limit) { if (allowed_lull) - maybe_send_keepalive(time(NULL), True); + maybe_send_keepalive(time(NULL), MSK_ALLOW_FLUSH); else maybe_flush_socket(0); counter = 0; @@ -2128,7 +2128,7 @@ void generate_files(int f_out, const char *local_name) if (i + cur_flist->ndx_start >= next_loopchk) { if (allowed_lull) - maybe_send_keepalive(time(NULL), True); + maybe_send_keepalive(time(NULL), MSK_ALLOW_FLUSH); else maybe_flush_socket(0); next_loopchk += loopchk_limit; |