if (result == -1) {
int savederrno = errno;
- vinfolog("Error sending request to backend %s: %d", ss->d_config.remote.toStringWithPort(), savederrno);
+ vinfolog("Error sending request to backend %s: %s", ss->d_config.remote.toStringWithPort(), strerror(savederrno));
/* This might sound silly, but on Linux send() might fail with EINVAL
if the interface the socket was bound to doesn't exist anymore.
We don't want to reconnect the real socket if the healthcheck failed,
because it's not using the same socket.
*/
- if (!healthCheck && (savederrno == EINVAL || savederrno == ENODEV)) {
+ if (!healthCheck && (savederrno == EINVAL || savederrno == ENODEV || savederrno == ENETUNREACH)) {
ss->reconnect();
}
}