BUG/MINOR: backend: fix condition for reuse on mode HTTP
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Fri, 5 Mar 2021 14:34:56 +0000 (15:34 +0100)
committerWilly Tarreau <w@1wt.eu>
Fri, 5 Mar 2021 16:22:41 +0000 (17:22 +0100)
commite788dfc3609ace6b9fba71698e39ef0b74696593
treeb45301a54461e3f5a56bd6e0310c97927e7610b5
parent7851701edd3896e4849040101bdb97dc026ba71c
BUG/MINOR: backend: fix condition for reuse on mode HTTP

This commit is a fix/complement to the following one :
08d87b3f49867440f66aee09173c84bf58cbc859
BUG/MEDIUM: backend: never reuse a connection for tcp mode

It fixes the check for the early insertion of backend connections in
the reuse lists if the backend mode is HTTP.

The impact of this bug seems limited because :
- in tcp mode, no insertion is done in the avail list as mux_pt does not
  support multiple streams.
- in http mode, muxes are also responsible to insert backend connections
  in lists in their detach functions. Prior to this fix the reuse rate
  could be slightly inferior.

It can be backported to 2.3.

(cherry picked from commit 249f0562cf2654488100d83d66c73902a2b1eb6c)
Signed-off-by: Willy Tarreau <w@1wt.eu>
src/backend.c