commit | c12b5e663d91b367f59c9b895d54645c5305e959 | [log] [tgz] |
---|---|---|
author | Willy Tarreau <w@1wt.eu> | Tue Aug 04 19:45:36 2015 +0200 |
committer | Willy Tarreau <w@1wt.eu> | Wed Aug 05 21:42:12 2015 +0200 |
tree | baab11ff02152fcddaa96a4a85c6ee471d7c97e2 | |
parent | 7b00492ce3d7be9b5f8ecf4863a700f271f11936 [diff] |
MEDIUM: backend: don't call si_alloc_conn() when we reuse a valid connection connect_server() already does most of the check that is done again in si_alloc_conn(), so let's simply reuse the existing connection instead of calling the function again. It will also simplify the connection reuse. Indeed, for reuse to be set, it also requires srv_conn to be valid. In the end, the only situation where we have to release the existing connection and allocate a new one is when reuse == 0.