X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/9f639210ca71c548b76d311d826899ed36f98372..5e7dbaca50e00e6f418a4e8ae6ccfcf4ccb926f8:/cleanup.c diff --git a/cleanup.c b/cleanup.c index 2a850832..ea973391 100644 --- a/cleanup.c +++ b/cleanup.c @@ -26,7 +26,7 @@ * shutdown() of socket connections. This eliminates the abortive * TCP RST sent by a Winsock-based system when the close() occurs. **/ -void close_all() +void close_all(void) { #ifdef SHUTDOWN_ALL_SOCKETS int max_fd; @@ -131,8 +131,11 @@ void _exit_cleanup(int code, const char *file, int line) } } - if (code == 0 && (io_error || log_got_error)) { - code = RERR_PARTIAL; + if (code == 0) { + if ((io_error & ~IOERR_VANISHED) || log_got_error) + code = RERR_PARTIAL; + else if (io_error) + code = RERR_VANISHED; } if (code) log_exit(code, file, line);