MINOR: stream-int: use si_release_endpoint() to close idle conns
We don't want to open-code the connection close code in
si_idle_conn_wake_cb() because we need to centralize some controls.
diff --git a/src/stream_interface.c b/src/stream_interface.c
index b1bed03..32210bb 100644
--- a/src/stream_interface.c
+++ b/src/stream_interface.c
@@ -515,10 +515,7 @@
if (conn->flags & (CO_FL_ERROR | CO_FL_SOCK_RD_SH)) {
/* warning, we can't do anything on <conn> after this call ! */
- LIST_DEL(&conn->list);
- conn_force_close(conn);
- conn_free(conn);
- si->end = NULL;
+ si_release_endpoint(si);
return -1;
}
return 0;