mirror of
https://github.com/RsyncProject/rsync.git
synced 2026-05-16 10:55:20 -04:00
Avoid a potential hang when --remove-*-files is active.
This commit is contained in:
9
io.c
9
io.c
@@ -447,9 +447,14 @@ static void read_msg_fd(void)
|
||||
* this, sender-side deletions were mostly happening at the end. */
|
||||
void increment_active_files(int ndx, int itemizing, enum logcode code)
|
||||
{
|
||||
/* TODO: tune these limits? */
|
||||
while (active_filecnt >= (active_bytecnt >= 128*1024 ? 10 : 50)) {
|
||||
while (1) {
|
||||
/* TODO: tune these limits? */
|
||||
int limit = active_bytecnt >= 128*1024 ? 10 : 50;
|
||||
if (active_filecnt < limit)
|
||||
break;
|
||||
check_for_finished_files(itemizing, code, 0);
|
||||
if (active_filecnt < limit)
|
||||
break;
|
||||
if (iobuf_out_cnt)
|
||||
io_flush(NORMAL_FLUSH);
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user