[BUG] session: conn_retries was not always initialized
Johannes Smith reported some wrong retries count in logs associated with bad
requests. The cause was that the conn_retries field in the stream interface
was only initialized when attempting to connect, but is used when logging,
possibly with an uninitialized value holding last connection's conn_retries.
This could have been avoided by making use of a stream interface initializer.
This bug is 1.5-specific.
diff --git a/src/session.c b/src/session.c
index 24df936..d673aaa 100644
--- a/src/session.c
+++ b/src/session.c
@@ -188,6 +188,7 @@
s->si[1].owner = t;
s->si[1].state = s->si[1].prev_state = SI_ST_INI;
s->si[1].err_type = SI_ET_NONE;
+ s->si[1].conn_retries = 0; /* used for logging too */
s->si[1].err_loc = NULL;
s->si[1].connect = NULL;
s->si[1].release = NULL;