]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
[BUG] don't set an expiration date directly from now_ms
authorWilly Tarreau <w@1wt.eu>
Sun, 29 Mar 2009 08:24:15 +0000 (10:24 +0200)
committerWilly Tarreau <w@1wt.eu>
Sun, 29 Mar 2009 08:24:15 +0000 (10:24 +0200)
now_ms can be zero, don't set ->analyse_exp directly from it, we
must use tick_add() instead.

src/proto_http.c

index 8ab41992be91031de9845ead10e396a8984ee6b7..359488bea56bcb9fae243132ba7d56639718463e 100644 (file)
@@ -2313,7 +2313,7 @@ int http_process_request(struct session *s, struct buffer *req)
                req->analysers |= AN_REQ_HTTP_TARPIT;
                req->analyse_exp = tick_add_ifset(now_ms,  s->be->timeout.tarpit);
                if (!req->analyse_exp)
-                       req->analyse_exp = now_ms;
+                       req->analyse_exp = tick_add(now_ms, 0);
        }
 
        /* OK let's go on with the BODY now */