MAJOR: connections: Detach connections from streams.
Do not destroy the connection when we're about to destroy a stream. This
prevents us from doing keepalive on server connections when the client is
using HTTP/2, as a new stream is created for each request.
Instead, the session is now responsible for destroying connections.
When reusing connections, the attach() mux method is now used to create a new
conn_stream.
diff --git a/include/proto/connection.h b/include/proto/connection.h
index ade6994..611e6ad 100644
--- a/include/proto/connection.h
+++ b/include/proto/connection.h
@@ -673,10 +673,12 @@
LIST_INIT(&sess->conn_list);
}
conn_force_unsubscribe(conn);
+ LIST_DEL(&conn->list);
+ LIST_INIT(&conn->list);
pool_free(pool_head_connection, conn);
}
-/* Release a conn_stream, and kill the connection if it was the last one */
+/* Release a conn_stream */
static inline void cs_destroy(struct conn_stream *cs)
{
if (cs->conn->mux)