Skip to content

Commit 1fee385

Browse files
tacerustridge
authored andcommitted
Return from #list command with 0
The "#list" command should not be treated as a failure when it is both a legitimate request by the client, and correctly answered by the server. It is commonly used for assessing whether a rsync endpoint is healthy, having it return with a non-zero exit code causes misleading error reports, and, in case of socket activation, failed service instances on the server. Signed-off-by: Georg Pfuetzenreuter <[email protected]>
1 parent 1c5ebdc commit 1fee385

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clientserver.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1371,7 +1371,7 @@ int start_daemon(int f_in, int f_out)
13711371
rprintf(FLOG, "module-list request from %s (%s)\n",
13721372
host, addr);
13731373
send_listing(f_out);
1374-
return -1;
1374+
return 0;
13751375
}
13761376

13771377
if (*line == '#') {

0 commit comments

Comments
 (0)