[MINOR] checks: report it if checks fail due to socket creation error

If the check fails for a low-level socket error (eg: address family not
supportd), we currently ignore the status. We must report the error and
declare a failed health check in this case. The only real reason for this
would be when an IPv6 check is required on an IPv4-only system.
This commit is contained in:
Willy Tarreau 2011-03-09 20:38:33 +01:00
parent 6da0f6d6dd
commit d11ad78c26
1 changed files with 2 additions and 0 deletions

View File

@ -1430,6 +1430,8 @@ struct task *process_chk(struct task *t)
fdinfo[fd].port_range = NULL; fdinfo[fd].port_range = NULL;
close(fd); /* socket creation error */ close(fd); /* socket creation error */
} }
else
set_server_check_status(s, HCHK_STATUS_SOCKERR, strerror(errno));
if (s->result == SRV_CHK_UNKNOWN) { /* nothing done */ if (s->result == SRV_CHK_UNKNOWN) { /* nothing done */
//fprintf(stderr, "process_chk: 6\n"); //fprintf(stderr, "process_chk: 6\n");