MINOR: tcp: don't use tick_add_ifset() when timeout is known to be set

These two useless tests propably result from a copy-paste. The test is
performed in the condition to enter the block.
This commit is contained in:
Willy Tarreau 2013-11-04 15:56:53 +01:00
parent 3c3dfd5c61
commit 0bb166be5e
1 changed files with 2 additions and 2 deletions

View File

@ -912,7 +912,7 @@ int tcp_inspect_request(struct session *s, struct channel *req, int an_bit)
channel_dont_connect(req); channel_dont_connect(req);
/* just set the request timeout once at the beginning of the request */ /* just set the request timeout once at the beginning of the request */
if (!tick_isset(req->analyse_exp) && s->be->tcp_req.inspect_delay) if (!tick_isset(req->analyse_exp) && s->be->tcp_req.inspect_delay)
req->analyse_exp = tick_add_ifset(now_ms, s->be->tcp_req.inspect_delay); req->analyse_exp = tick_add(now_ms, s->be->tcp_req.inspect_delay);
return 0; return 0;
} }
@ -1015,7 +1015,7 @@ int tcp_inspect_response(struct session *s, struct channel *rep, int an_bit)
if (ret == ACL_PAT_MISS) { if (ret == ACL_PAT_MISS) {
/* just set the analyser timeout once at the beginning of the response */ /* just set the analyser timeout once at the beginning of the response */
if (!tick_isset(rep->analyse_exp) && s->be->tcp_rep.inspect_delay) if (!tick_isset(rep->analyse_exp) && s->be->tcp_rep.inspect_delay)
rep->analyse_exp = tick_add_ifset(now_ms, s->be->tcp_rep.inspect_delay); rep->analyse_exp = tick_add(now_ms, s->be->tcp_rep.inspect_delay);
return 0; return 0;
} }