[MINOR] checks: make shutdown() silently fail

Shutdown may fail for instance after an RST. So we must not report
any error for that.
This commit is contained in:
Willy Tarreau 2010-03-16 20:57:57 +01:00
parent 659d7bc4e3
commit 6315d914b6

View File

@ -917,11 +917,7 @@ static int event_srv_chk_r(int fd)
s->check_data[s->check_data_len - 1] = '\0';
/* Close the connection... */
int shut = shutdown(fd, SHUT_RDWR);
int err = errno;
if (shut == -1) {
Alert("event_srv_chk_r(): err = %i, %s\n", err, strerror(err));
}
shutdown(fd, SHUT_RDWR);
/* Run the checks... */
if (s->proxy->options & PR_O_HTTP_CHK) {