if (allowed_lull && !(++j % lull_mod))
maybe_send_keepalive();
else if (!(j % 200))
- maybe_flush_socket();
+ maybe_flush_socket(0);
}
}
if (first_flist->in_progress || first_flist->to_redo)
break;
- if (!read_batch)
+ if (!read_batch) {
write_ndx(sock_f_out, NDX_DONE);
+ maybe_flush_socket(1);
+ }
if (delete_during == 2 || !dir_tweaking) {
/* Skip directory touch-up. */
if (allowed_lull && !(i % lull_mod))
maybe_send_keepalive();
else if (!(i % 200))
- maybe_flush_socket();
+ maybe_flush_socket(0);
}
if (!inc_recurse) {