mirror of
https://github.com/haproxy/haproxy.git
synced 2026-06-09 00:32:33 -04:00
CLEANUP: mux-h1: remove the unneeded test on conn->owner in h1s_finish_detach()
Some checks are pending
Contrib / admin/halog/ (push) Waiting to run
Contrib / dev/flags/ (push) Waiting to run
Contrib / dev/haring/ (push) Waiting to run
Contrib / dev/hpack/ (push) Waiting to run
Contrib / dev/poll/ (push) Waiting to run
VTest / Generate Build Matrix (push) Waiting to run
VTest / (push) Blocked by required conditions
Windows / Windows, gcc, all features (push) Waiting to run
Some checks are pending
Contrib / admin/halog/ (push) Waiting to run
Contrib / dev/flags/ (push) Waiting to run
Contrib / dev/haring/ (push) Waiting to run
Contrib / dev/hpack/ (push) Waiting to run
Contrib / dev/poll/ (push) Waiting to run
VTest / Generate Build Matrix (push) Waiting to run
VTest / (push) Blocked by required conditions
Windows / Windows, gcc, all features (push) Waiting to run
There was a test below the "release" label on conn->owner to decide
whether to kill the connection or not. But this test is not needed,
because:
- for frontends, it's always set so the test never matches
- for backends, it was NULL on the second stream once a request
was being reused from an idle pool, so it couldn't be used to
discriminate between connections. In practice, the goal was to
try to detect certain dead connections but all cases leading to
such connections are either already handled in the tests before
(which don't reach this label), or are handled by the other
conditions.
Thus, let's remove this confusing test.
This commit is contained in:
parent
2e26e427a2
commit
2f61566b03
1 changed files with 1 additions and 2 deletions
|
|
@ -1251,8 +1251,7 @@ static int h1s_finish_detach(struct h1s *h1s)
|
|||
/* We don't want to close right now unless the connection is in error or shut down for writes */
|
||||
if ((h1c->flags & H1C_F_ERROR) ||
|
||||
(h1c->state == H1_CS_CLOSED) ||
|
||||
(h1c->state == H1_CS_CLOSING && !b_data(&h1c->obuf)) ||
|
||||
!h1c->conn->owner) {
|
||||
(h1c->state == H1_CS_CLOSING && !b_data(&h1c->obuf))) {
|
||||
TRACE_DEVEL("killing dead connection", H1_EV_STRM_END, h1c->conn);
|
||||
h1_release(h1c);
|
||||
goto released;
|
||||
|
|
|
|||
Loading…
Reference in a new issue