MINOR: queue: make sure the pendconn is released before logging
authorWilly Tarreau <w@1wt.eu>
Wed, 25 Jul 2018 04:55:12 +0000 (06:55 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 10 Aug 2018 13:04:08 +0000 (15:04 +0200)
commit66425e31b5216fa5e24d02f28ef25650936a6ae6
treee1356ea43b3ff043d718fc223327af686c26a505
parent287527a176b470b77cc85d37a7898da3ac9a4304
MINOR: queue: make sure the pendconn is released before logging

We'll soon need to rely on the pendconn position at the time of dequeuing
to figure the position a stream took in the queue. Usually it's not a
problem since pendconn_free() is called once the connection starts, but
it will make a difference for failed dequeues (eg: queue timeout reached).
Thus it's important to call pendconn_free() before logging in cases we are
not certain whether it was already performed, and to call pendconn_unlink()
after we know the pendconn will not be used so that we collect the queue
state as accurately as possible. As a benefit it will also make the
server's and backend's queues count more accurate in these cases.
src/proto_http.c
src/stream.c