diff --git a/src/connector.c b/src/connector.c index 89017590..ae768f8b 100644 --- a/src/connector.c +++ b/src/connector.c @@ -358,7 +358,7 @@ retry: /* This read call is non-blocking since the socket is set to O_NOBLOCK */ ret = read(client->fd, client->buf + client->bufofs, buflen); if (ret < 1) { - if (errno == EAGAIN || errno == EWOULDBLOCK || !ret) + if (likely(errno == EAGAIN || errno == EWOULDBLOCK || !ret)) return; LOGINFO("Client fd %d disconnected - recv fail with bufofs %d ret %d errno %d %s", client->fd, client->bufofs, ret, errno, ret && errno ? strerror(errno) : "");