MEDIUM: connection: inform si_alloc_conn() whether existing conn is OK or not
When allocating a new connection, only the caller knows whether it's
acceptable to reuse the previous one or not. Let's pass this information
to si_alloc_conn() which will do the cleanup if the connection is not
acceptable.
diff --git a/src/backend.c b/src/backend.c
index c680777..657da9d 100644
--- a/src/backend.c
+++ b/src/backend.c
@@ -982,7 +982,7 @@
int connect_server(struct session *s)
{
struct connection *cli_conn;
- struct connection *srv_conn = si_alloc_conn(s->req->cons);
+ struct connection *srv_conn = si_alloc_conn(s->req->cons, 0);
struct server *srv;
int err;