MEDIUM: stream-int: queue idle connections at the server
Now we get a per-server list of all idle connections. That way we'll
be able to reclaim them upon shortage later.
diff --git a/src/backend.c b/src/backend.c
index f8185d7..bbe9573 100644
--- a/src/backend.c
+++ b/src/backend.c
@@ -1052,6 +1052,11 @@
if (!reuse)
srv_conn = si_alloc_conn(&s->si[1]);
+ else {
+ /* reusing our connection, take it out of the idle list */
+ LIST_DEL(&srv_conn->list);
+ LIST_INIT(&srv_conn->list);
+ }
if (!srv_conn)
return SF_ERR_RESOURCE;