X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/dcd08dc51cb77e9ab796d1bdb5739436c90a6ad4..880570f2287326f4c4d3c65b1298af733a82de02:/socket.c?ds=sidebyside diff --git a/socket.c b/socket.c index 29fb2dcd..be0e311b 100644 --- a/socket.c +++ b/socket.c @@ -455,7 +455,7 @@ void start_accept_loop(int port, int (*fn)(int, int)) #ifdef INET6 if (errno == EADDRINUSE && i > 0) { rprintf(FINFO, - "Try using --ipv4 or --ipv6 to avoid this listen() error."); + "Try using --ipv4 or --ipv6 to avoid this listen() error.\n"); } #endif exit_cleanup(RERR_SOCKETIO); @@ -727,14 +727,16 @@ static int socketpair_tcp(int fd[2]) goto failed; close(listener); + listener = -1; + + set_blocking(fd[1]); + if (connect_done == 0) { if (connect(fd[1], (struct sockaddr *)&sock, sizeof sock) != 0 && errno != EISCONN) goto failed; } - set_blocking(fd[1]); - /* all OK! */ return 0;