mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-03-01 09:00:51 +00:00
MINOR: connection: perform the call to xprt->shutw() in conn_data_shutw()
This will save callers from having to care about conn->xprt and xprt->shutw. Note that shutw() takes a second argument indicating whether it's a clean or a hard shutw. This is used by SSL which tries to close cleanly in most cases. Here we provide two versions, conn_data_shutw() which performs the clean close, and conn_data_shutw_hard() which does the unclean one.
This commit is contained in:
parent
4dfd54f26a
commit
729c69f6e5
@ -420,6 +420,20 @@ static inline void conn_data_shutw(struct connection *c)
|
||||
{
|
||||
c->flags |= CO_FL_DATA_WR_SH;
|
||||
__conn_data_stop_send(c);
|
||||
|
||||
/* clean data-layer shutdown */
|
||||
if (c->xprt && c->xprt->shutw)
|
||||
c->xprt->shutw(c, 1);
|
||||
}
|
||||
|
||||
static inline void conn_data_shutw_hard(struct connection *c)
|
||||
{
|
||||
c->flags |= CO_FL_DATA_WR_SH;
|
||||
__conn_data_stop_send(c);
|
||||
|
||||
/* unclean data-layer shutdown */
|
||||
if (c->xprt && c->xprt->shutw)
|
||||
c->xprt->shutw(c, 0);
|
||||
}
|
||||
|
||||
/* detect sock->data read0 transition */
|
||||
|
Loading…
Reference in New Issue
Block a user