diff --git a/cmirror.c b/cmirror.c index f996e47..bf40d5a 100644 --- a/cmirror.c +++ b/cmirror.c @@ -695,7 +695,6 @@ static void slave(char *slave_path) { die("%s: %m\n", unix_socket_name); listen(s_listen, 1); fprintf(out, "LISTEN %s\n", unix_socket_name); - fflush(out); } else { struct sockaddr_in sockaddr; socklen_t sockaddr_len = sizeof(sockaddr); @@ -705,8 +704,8 @@ static void slave(char *slave_path) { if (res == -1) die("listen: %m\n"); fprintf(out, "LISTEN %d\n", ntohs(sockaddr.sin_port)); - fflush(out); } + fflush(out); s_data = accept(s_listen, NULL, NULL); if (s_data == -1) die("accept: %m\n");