If we failed to add the connection to the session, only try to add it back
to the server idle list if it has a mux, otherwise the connection is
incomplete and unusable.
This should be backported to 1.9.
if (alloced_cs)
si_release_endpoint(&s->si[1]);
srv_conn->owner = NULL;
- if (!srv_add_to_idle_list(objt_server(srv_conn->target), srv_conn))
+ if (srv_conn->mux && !srv_add_to_idle_list(objt_server(srv_conn->target), srv_conn))
/* The server doesn't want it, let's kill the connection right away */
srv_conn->mux->destroy(srv_conn);
srv_conn = NULL;