From: Martin Pool Date: Thu, 11 Apr 2002 01:56:35 +0000 (+0000) Subject: Receiving an @ERROR line from the server is (I think) always fatal, so X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/commitdiff_plain/136ac7ecec03339837e4b70f3128fd3609d37374 Receiving an @ERROR line from the server is (I think) always fatal, so the client should exit upon receiving one and not be surprised that the socket closes. --- diff --git a/clientserver.c b/clientserver.c index 190872d2..2babcffc 100644 --- a/clientserver.c +++ b/clientserver.c @@ -161,10 +161,14 @@ int start_socket_client(char *host, char *path, int argc, char *argv[]) exit(0); } - if (strncmp(line, "@ERROR", 6) == 0) + if (strncmp(line, "@ERROR", 6) == 0) { rprintf(FERROR,"%s\n", line); - else + /* This is always fatal; the server will now + * close the socket. */ + return RERR_STARTCLIENT; + } else { rprintf(FINFO,"%s\n", line); + } } kludge_around_eof = False;