diff --git a/src/connector.c b/src/connector.c index 6e469e29..2c1fb215 100644 --- a/src/connector.c +++ b/src/connector.c @@ -521,11 +521,11 @@ void *receiver(void *arg) /* See what type of error this is and raise the log * level of the message if it's unexpected. */ getsockopt(client->fd, SOL_SOCKET, SO_ERROR, (void *)&error, &errlen); - if (error && error != 104) { - LOGNOTICE("Client id %"PRId64" fd %d epollerr HUP in epoll with error %d: %s", + if (error != 104) { + LOGNOTICE("Client id %"PRId64" fd %d epollerr HUP in epoll with errno %d: %s", client->id, client->fd, error, strerror(error)); } else { - LOGINFO("Client id %"PRId64" fd %d epollerr HUP in epoll with error %d: %s", + LOGINFO("Client id %"PRId64" fd %d epollerr HUP in epoll with errno %d: %s", client->id, client->fd, error, strerror(error)); } invalidate_client(cdata->pi->ckp, cdata, client);