]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MEDIUM: spoe: Force the reuse 'always' mode for SPOP backends
authorChristopher Faulet <cfaulet@haproxy.com>
Mon, 8 Jul 2024 17:14:35 +0000 (19:14 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Fri, 12 Jul 2024 13:27:05 +0000 (15:27 +0200)
The reuse "always" mode is forced for SPOP backends. For now, SPOP
connections cannot be idle, but once implemented, thanks to this patch, it
will be possible to reuse SPOP connections.

The related issue is #2502.

src/cfgparse.c

index 990d2a488078d64ef27e46c1dd4f11b3c168bf38..8c231bbbdf18db9527368a0871db66efc2697861 100644 (file)
@@ -3918,6 +3918,8 @@ out_uri_auth_compat:
 
                        if ((curproxy->mode != PR_MODE_HTTP) && (curproxy->options & PR_O_REUSE_MASK) != PR_O_REUSE_NEVR)
                                curproxy->options &= ~PR_O_REUSE_MASK;
+                       if (curproxy->mode == PR_MODE_SPOP)
+                               curproxy->options |= PR_O_REUSE_ALWS;
 
                        if ((curproxy->mode != PR_MODE_HTTP) && newsrv->flags & SRV_F_RHTTP) {
                                ha_alert("%s '%s' : server %s uses reverse HTTP addressing which can only be used with HTTP mode.\n",