From: Willy Tarreau Date: Thu, 12 Mar 2015 22:11:26 +0000 (+0100) Subject: MINOR: checks: use conn_data_shutw_hard() instead of call via xprt X-Git-Tag: v1.6-dev2~338 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b4017d0f779ac73738e2b75fd19539466435c43d;p=thirdparty%2Fhaproxy.git MINOR: checks: use conn_data_shutw_hard() instead of call via xprt Now we only rely on the connection to do the job. This makes the code cleaner as we don't have any references to the transport shutdown outside of the connection anymore. --- diff --git a/src/checks.c b/src/checks.c index 8a9eab5d1a..f61bc9c786 100644 --- a/src/checks.c +++ b/src/checks.c @@ -1293,14 +1293,13 @@ static void event_srv_chk_r(struct connection *conn) * To avoid sending RSTs all the time, we first try to drain pending * data. */ - if (conn->xprt && conn->xprt->shutw) - conn->xprt->shutw(conn, 0); + __conn_data_stop_both(conn); + conn_data_shutw_hard(conn); /* OK, let's not stay here forever */ if (check->result == CHK_RES_FAILED) conn->flags |= CO_FL_ERROR; - __conn_data_stop_both(conn); task_wakeup(t, TASK_WOKEN_IO); return;