]> git.ipfire.org Git - thirdparty/haproxy.git/commit
[BUG] accept: don't close twice upon error
authorWilly Tarreau <w@1wt.eu>
Thu, 11 Nov 2010 09:56:04 +0000 (10:56 +0100)
committerWilly Tarreau <w@1wt.eu>
Thu, 11 Nov 2010 10:05:20 +0000 (11:05 +0100)
commitabe8ea5c1df16e81479644397ed516e391bf630a
treedfc0ac036859d68441cd92df1f8006e01665816a
parentbd55e3167b7b7f179062a86c6219defe12e5ad47
[BUG] accept: don't close twice upon error

The stream_sock's accept() used to close the FD upon error, but this
was also sometimes performed by the frontend's accept() called via the
session's accept(). Those interlaced calls were also responsible for the
spaghetti-looking error unrolling code in session.c and stream_sock.c.

Now the frontend must not close the FD anymore, the session is responsible
for that. It also takes care of just closing the FD or also removing from
the FD lists, depending on its state. The socket-level accept() does not
have to care about that anymore.
src/frontend.c
src/session.c
src/stream_sock.c