X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/bcf5b1335d6e5183f9545eb1b23e16185264e311..8d72ef6e5258fe6a3174db822e5a6b1f7a32e252:/clientserver.c diff --git a/clientserver.c b/clientserver.c index 92d9b2c0..0723560e 100644 --- a/clientserver.c +++ b/clientserver.c @@ -132,9 +132,16 @@ static int rsync_module(int fd, int i) } if (!claim_connection(lp_lock_file(), lp_max_connections())) { - rprintf(FERROR,"max connections (%d) reached\n", - lp_max_connections()); - io_printf(fd,"@ERROR: max connections (%d) reached - try again later\n", lp_max_connections()); + if (errno) { + rprintf(FERROR,"failed to open lock file %s : %s\n", + lp_lock_file(), strerror(errno)); + io_printf(fd,"@ERROR: failed to open lock file %s : %s\n", + lp_lock_file(), strerror(errno)); + } else { + rprintf(FERROR,"max connections (%d) reached\n", + lp_max_connections()); + io_printf(fd,"@ERROR: max connections (%d) reached - try again later\n", lp_max_connections()); + } return -1; }