X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/20caffd2b361bcad51692998411e4cc566c04b40..0a9fbe17de7d9d298ed64263a4b3cfb77b871199:/io.c diff --git a/io.c b/io.c index 7c50d5af..610a802b 100644 --- a/io.c +++ b/io.c @@ -1197,7 +1197,8 @@ void io_end_buffering_out(BOOL free_buffers) void maybe_flush_socket(int important) { - if (iobuf.out.buf && iobuf.out.len && (important || time(NULL) - last_io_out >= 5)) + if (flist_eof && iobuf.out.buf && iobuf.out.len > iobuf.out_empty_len + && (important || time(NULL) - last_io_out >= 5)) io_flush(NORMAL_FLUSH); }