Fix erronous error checking
This commit is contained in:
parent
59fc8d81a5
commit
d5a057a685
1 changed files with 1 additions and 1 deletions
|
@ -128,7 +128,7 @@ void init_unix_socket_handler(UnixSocketHandler *handler) {
|
||||||
}
|
}
|
||||||
|
|
||||||
int ret = fcntl(handler->socket_descriptor, F_SETFL, O_NONBLOCK, 1);
|
int ret = fcntl(handler->socket_descriptor, F_SETFL, O_NONBLOCK, 1);
|
||||||
if (ret != -1) {
|
if (ret == -1) {
|
||||||
close(handler->socket_descriptor);
|
close(handler->socket_descriptor);
|
||||||
handler->socket_descriptor = -1;
|
handler->socket_descriptor = -1;
|
||||||
handler->flags = 0xFFFFFFFFFFFFFFFF;
|
handler->flags = 0xFFFFFFFFFFFFFFFF;
|
||||||
|
|
Loading…
Reference in a new issue