From 605fed4b4659e86dba01dfc3c873f11879a230e9 Mon Sep 17 00:00:00 2001 From: Wayne Davison Date: Thu, 19 May 2005 08:52:24 +0000 Subject: [PATCH] Periodically call maybe_send_keepalive() when timeouts are in effect (this ensures that the receiver doesn't timeout when we're still doing work reading data from the generator). --- sender.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sender.c b/sender.c index a738b421..00b60c94 100644 --- a/sender.c +++ b/sender.c @@ -28,6 +28,7 @@ extern int log_format_has_i; extern int daemon_log_format_has_i; extern int csum_length; extern int io_error; +extern int allowed_lull; extern int protocol_version; extern int remove_sent_files; extern int updating_basis_file; @@ -56,6 +57,7 @@ static struct sum_struct *receive_sums(int f) { struct sum_struct *s; int32 i; + int lull_mod = allowed_lull * 5; OFF_T offset = 0; if (!(s = new(struct sum_struct))) @@ -89,6 +91,9 @@ static struct sum_struct *receive_sums(int f) s->sums[i].len = s->blength; offset += s->sums[i].len; + if (allowed_lull && !(i % lull_mod)) + maybe_send_keepalive(); + if (verbose > 3) { rprintf(FINFO, "chunk[%d] len=%d offset=%.0f sum1=%08x\n", -- 2.34.1