From: Willy Tarreau Date: Wed, 23 Sep 2015 15:56:02 +0000 (+0200) Subject: MINOR: stream-int: use si_release_endpoint() to close idle conns X-Git-Tag: v1.6-dev6~88 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c4b56e4470658d1ad0d2bd59060e85091c97d476;p=thirdparty%2Fhaproxy.git 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 b1bed032a7..32210bbd30 100644 --- a/src/stream_interface.c +++ b/src/stream_interface.c @@ -515,10 +515,7 @@ static int si_idle_conn_wake_cb(struct connection *conn) if (conn->flags & (CO_FL_ERROR | CO_FL_SOCK_RD_SH)) { /* warning, we can't do anything on 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;