Move accept sequence
[lttng-tools.git] / kconsumerd / kconsumerd.c
index 315095ee3c102794817176262d096e1b21089b96..96051caafdfeba7dd09b4029c16404d28769cf08 100644 (file)
@@ -511,13 +511,13 @@ static void *thread_receive_fds(void *data)
                goto error;
        }
 
+       /* Blocking call, waiting for transmission */
+       sock = lttcomm_accept_unix_sock(client_socket);
+       if (sock <= 0) {
+               WARN("On accept, retrying");
+               goto error;
+       }
        while (1) {
-               /* Blocking call, waiting for transmission */
-               sock = lttcomm_accept_unix_sock(client_socket);
-               if (sock <= 0) {
-                       WARN("On accept, retrying");
-                       continue;
-               }
 
                /* We first get the number of fd we are about to receive */
                ret = lttcomm_recv_unix_sock(sock, &tmp,
This page took 0.022877 seconds and 4 git commands to generate.