From d5a057a6851bd2c755dea8270246ae465e285c28 Mon Sep 17 00:00:00 2001 From: Stephen Seo Date: Sun, 13 Aug 2023 14:26:39 +0900 Subject: [PATCH] Fix erronous error checking --- src/socket.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/socket.c b/src/socket.c index 71150a5..43a5f0a 100644 --- a/src/socket.c +++ b/src/socket.c @@ -128,7 +128,7 @@ void init_unix_socket_handler(UnixSocketHandler *handler) { } int ret = fcntl(handler->socket_descriptor, F_SETFL, O_NONBLOCK, 1); - if (ret != -1) { + if (ret == -1) { close(handler->socket_descriptor); handler->socket_descriptor = -1; handler->flags = 0xFFFFFFFFFFFFFFFF;