]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: tcp: don't use tick_add_ifset() when timeout is known to be set
authorWilly Tarreau <w@1wt.eu>
Mon, 4 Nov 2013 14:56:53 +0000 (15:56 +0100)
committerWilly Tarreau <w@1wt.eu>
Mon, 4 Nov 2013 17:12:20 +0000 (18:12 +0100)
These two useless tests propably result from a copy-paste. The test is
performed in the condition to enter the block.

src/proto_tcp.c

index 0f1dc370af3e144d09ff7e95c132cf7402efb505..1a68cfdf50668f70709c55cfa00ddf6c501e4c2a 100644 (file)
@@ -912,7 +912,7 @@ int tcp_inspect_request(struct session *s, struct channel *req, int an_bit)
                                channel_dont_connect(req);
                                /* just set the request timeout once at the beginning of the request */
                                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;
                        }
 
@@ -1015,7 +1015,7 @@ int tcp_inspect_response(struct session *s, struct channel *rep, int an_bit)
                        if (ret == ACL_PAT_MISS) {
                                /* just set the analyser timeout once at the beginning of the response */
                                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;
                        }