Fix erronous error checking

This commit is contained in:
Stephen Seo 2023-08-13 14:26:39 +09:00
parent 59fc8d81a5
commit d5a057a685

View file

@ -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;