MINOR: connection: make conn_sock_shutw() actually perform the shutdown() call

This function was not used yet and was only supposed to mark the connection
as shutdown for write. Unfortunately at other places in stream_interface.c,
we're seeing a bit of layering violations with attempts to perform the shutdown
on the fd directly. Let's make this function call shutdown() itself so that
the callers only have to care about the connection.
This commit is contained in:
Willy Tarreau 2015-03-12 22:42:29 +01:00
parent 1140512f76
commit a02e8c9510
1 changed files with 2 additions and 0 deletions

View File

@ -412,6 +412,8 @@ static inline void conn_sock_shutw(struct connection *c)
{
c->flags |= CO_FL_SOCK_WR_SH;
__conn_sock_stop_send(c);
if (conn_ctrl_ready(c))
shutdown(c->t.sock.fd, SHUT_WR);
}
static inline void conn_data_shutw(struct connection *c)