]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: listener: make the wait paths cleaner and more reliable
authorWilly Tarreau <w@1wt.eu>
Tue, 10 Dec 2019 11:01:21 +0000 (12:01 +0100)
committerWilly Tarreau <w@1wt.eu>
Tue, 10 Dec 2019 11:04:27 +0000 (12:04 +0100)
commit0591bf7deb3215b7b3054e2c6c71b02c6e07a0fc
treeceb1905b6ce8c7a5e25bf319c3d286bd1b9b012a
parent92079934a913a330a57e6d84eba3dca68c0cde8e
MINOR: listener: make the wait paths cleaner and more reliable

In listener_accept() there are several situations where we have to wait
for an event or a delay. These ones all implement their own call to
limit_listener() and the associated task_schedule(). In addition to
being ugly and confusing, one expire date computation is even wrong as
it doesn't take in account the fact that we're using threads and that
the value might change in the middle. Fortunately task_schedule() gets
it right for us.

This patch creates two jump locations, one for the global queue and
one for the proxy queue, allowing the rest of the code to only compute
the expire delay and jump to the right location.
src/listener.c