If the server is exiting with an error, delay our exit just a little
[rsync/rsync.git] / cleanup.c
index 428c47e..6fc7225 100644 (file)
--- a/cleanup.c
+++ b/cleanup.c
@@ -142,7 +142,7 @@ NORETURN void _exit_cleanup(int code, const char *file, int line)
                                flush_write_file(cleanup_fd_w);
                                close(cleanup_fd_w);
                        }
-                       finish_transfer(cleanup_new_fname, fname, NULL,
+                       finish_transfer(cleanup_new_fname, fname, NULL, NULL,
                                        cleanup_file, 0, !partial_dir);
                }
 
@@ -189,6 +189,8 @@ NORETURN void _exit_cleanup(int code, const char *file, int line)
                /* FALLTHROUGH */
 #include "case_N.h"
 
+               if (am_server && code)
+                       msleep(100);
                close_all();
 
                /* FALLTHROUGH */