]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: peers: set the accept date in outgoing connections
authorWilly Tarreau <w@1wt.eu>
Tue, 1 Oct 2013 15:06:10 +0000 (17:06 +0200)
committerWilly Tarreau <w@1wt.eu>
Wed, 30 Oct 2013 07:12:26 +0000 (08:12 +0100)
Without this, "show sess" on the CLI reports a wrong age.

src/peers.c

index 7247d762443178e4e2472fc551f4bbdd02f2da0a..0516d0cc93c7abad7fb1ee3ded0f7a839c013d28 100644 (file)
@@ -1181,11 +1181,14 @@ static struct session *peer_session_create(struct peer *peer, struct peer_sessio
        memset(s->stkctr, 0, sizeof(s->stkctr));
 
        /* FIXME: the logs are horribly complicated now, because they are
-        * defined in <p>, <p>, and later <be> and <be>.
+        * defined in <p>, <p>, and later <be> and <be>. We still initialize
+        * a few of them to help troubleshooting (eg: show sess shows them).
         */
 
        s->logs.logwait = 0;
        s->logs.level = 0;
+       s->logs.accept_date = date; /* user-visible date for logging */
+       s->logs.tv_accept = now;  /* corrected date for internal use */
        s->do_log = NULL;
 
        /* default error reporting function, may be changed by analysers */