31 lines
1019 B
Diff
31 lines
1019 B
Diff
![]() |
From baa0b0fab303179d5195e347b1254b1da2c6ff33 Mon Sep 17 00:00:00 2001
|
||
|
From: Willy Tarreau <w@1wt.eu>
|
||
|
Date: Tue, 19 Mar 2013 08:19:59 +0100
|
||
|
Subject: BUG/MINOR: checks: fix an warning introduced by commit 2f61455a
|
||
|
|
||
|
Commit 2f61455a fixed a TIME_WAIT issue but introduced a warning as in
|
||
|
case of an error, it relies on the shutr variable which is not initialized
|
||
|
to decide whether or not to disable lingering on the socket. This has no
|
||
|
impact obviously since the socket is already dead, but better fix this
|
||
|
anyway and avoid doing the setsockopt() in this case.
|
||
|
---
|
||
|
src/checks.c | 2 +-
|
||
|
1 files changed, 1 insertions(+), 1 deletions(-)
|
||
|
|
||
|
diff --git a/src/checks.c b/src/checks.c
|
||
|
index 13b5c64..e586e4c 100644
|
||
|
--- a/src/checks.c
|
||
|
+++ b/src/checks.c
|
||
|
@@ -888,7 +888,7 @@ static int event_srv_chk_r(int fd)
|
||
|
/* in case of TCP only, this tells us if the connection failed */
|
||
|
if (!(s->result & SRV_CHK_ERROR))
|
||
|
set_server_check_status(s, HCHK_STATUS_SOCKERR, NULL);
|
||
|
-
|
||
|
+ shutr = 1;
|
||
|
goto out_wakeup;
|
||
|
}
|
||
|
|
||
|
--
|
||
|
1.7.1
|
||
|
|