Browse Source

We won't get no error if we are not testing fd -1 sockets any more, and use errno for consistent parsing of socket close errors

master
Con Kolivas 10 years ago
parent
commit
6a159bf5dc
  1. 6
      src/connector.c

6
src/connector.c

@ -521,11 +521,11 @@ void *receiver(void *arg)
/* See what type of error this is and raise the log /* See what type of error this is and raise the log
* level of the message if it's unexpected. */ * level of the message if it's unexpected. */
getsockopt(client->fd, SOL_SOCKET, SO_ERROR, (void *)&error, &errlen); getsockopt(client->fd, SOL_SOCKET, SO_ERROR, (void *)&error, &errlen);
if (error && error != 104) { if (error != 104) {
LOGNOTICE("Client id %"PRId64" fd %d epollerr HUP in epoll with error %d: %s", LOGNOTICE("Client id %"PRId64" fd %d epollerr HUP in epoll with errno %d: %s",
client->id, client->fd, error, strerror(error)); client->id, client->fd, error, strerror(error));
} else { } 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)); client->id, client->fd, error, strerror(error));
} }
invalidate_client(cdata->pi->ckp, cdata, client); invalidate_client(cdata->pi->ckp, cdata, client);

Loading…
Cancel
Save