MINOR: session: simplify error path in session_accept_fd()
authorWilly Tarreau <w@1wt.eu>
Thu, 15 Oct 2020 05:11:14 +0000 (07:11 +0200)
committerWilly Tarreau <w@1wt.eu>
Thu, 15 Oct 2020 19:47:56 +0000 (21:47 +0200)
commit01ca149047c1dade3c4ecdf7bc0e65be564513ac
tree1a29312c2db83eb1bb505db18bb7235a450a7b2c
parent83efc320aadd885e05760cb9757f5e85a96845c1
MINOR: session: simplify error path in session_accept_fd()

Now that this function is always called with an initialized connection
and that the control layer is always initialized, we don't need to play
games with fdtab[] to decide how to close, we can simply rely on the
regular close path using conn_ctrl_close(), which can be fused with
conn_xprt_close() into conn_full_close().

The code is cleaner because the FD is now used only for some
protocol-specific setup (that will eventually have to move) and to
try to send a hard-coded HTTP 500 error message on raw sockets.
src/session.c