From: Willy Tarreau Date: Sun, 21 Dec 2008 12:00:41 +0000 (+0100) Subject: [BUG] check timeout must not be changed if timeout.check is not set X-Git-Tag: v1.3.16-rc1~93 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7cd9d94360e3c597ff3a15490ff7fbd3b8232f14;p=thirdparty%2Fhaproxy.git [BUG] check timeout must not be changed if timeout.check is not set This causes health checks to stop after some time since the new ticks-based scheduler because a check timeout is set to eternity. This fix must be merged into master but not in earlier versions as it only affects the new scheduler. (cherry picked from commit e349eb452b655dc1adc059f05ba8b36565753393) --- diff --git a/src/checks.c b/src/checks.c index 7140be4037..d6ce3355e1 100644 --- a/src/checks.c +++ b/src/checks.c @@ -364,7 +364,8 @@ static int event_srv_chk_w(int fd) #endif if (ret == s->proxy->check_len) { /* we allow up to if nonzero for a responce */ - t->expire = tick_add_ifset(now_ms, s->proxy->timeout.check); + if (s->proxy->timeout.check) + t->expire = tick_add_ifset(now_ms, s->proxy->timeout.check); EV_FD_SET(fd, DIR_RD); /* prepare for reading reply */ goto out_nowake; }