create_local_socket(): Avoid code duplication.
[paraslash.git] / afs.c
diff --git a/afs.c b/afs.c
index 7832a32..c677b6c 100644 (file)
--- a/afs.c
+++ b/afs.c
@@ -646,15 +646,6 @@ static int setup_command_socket_or_die(void)
                exit(EXIT_FAILURE);
        }
        socket_fd = ret;
-       if (listen(socket_fd , 5) < 0) {
-               PARA_EMERG_LOG("can not listen on socket\n");
-               exit(EXIT_FAILURE);
-       }
-       ret = mark_fd_nonblocking(socket_fd);
-       if (ret < 0) {
-               close(socket_fd);
-               return ret;
-       }
        PARA_INFO_LOG("listening on socket %s (fd %d)\n", socket_name,
                socket_fd);
        return socket_fd;