if (srv_conn)
srv_conn->target = s->target;
srv_cs = NULL;
+
+ if ((s->be->options & PR_O_REUSE_MASK) == PR_O_REUSE_NEVR)
+ conn->flags |= CO_FL_PRIVATE;
}
if (srv_conn && srv && was_unused) {
if (!(fconn->conn->flags & (CO_FL_ERROR|CO_FL_SOCK_RD_SH|CO_FL_SOCK_WR_SH)) &&
(fconn->flags & FCGI_CF_KEEP_CONN)) {
- /* Never ever allow to reuse a connection from a non-reuse backend */
- if ((fconn->proxy->options & PR_O_REUSE_MASK) == PR_O_REUSE_NEVR)
- fconn->conn->flags |= CO_FL_PRIVATE;
if (fconn->conn->flags & CO_FL_PRIVATE) {
if (!fconn->conn->owner) {
fconn->conn->owner = sess;
goto release;
}
- /* Never ever allow to reuse a connection from a non-reuse backend */
- if ((h1c->px->options & PR_O_REUSE_MASK) == PR_O_REUSE_NEVR)
- h1c->conn->flags |= CO_FL_PRIVATE;
-
if (!(h1c->conn->owner) && (h1c->conn->flags & CO_FL_PRIVATE)) {
h1c->conn->owner = sess;
if (!session_add_conn(sess, h1c->conn, h1c->conn->target)) {
if (h2c->flags & H2_CF_IS_BACK) {
if (!(h2c->conn->flags &
(CO_FL_ERROR | CO_FL_SOCK_RD_SH | CO_FL_SOCK_WR_SH))) {
- /* Never ever allow to reuse a connection from a non-reuse backend */
- if ((h2c->proxy->options & PR_O_REUSE_MASK) == PR_O_REUSE_NEVR)
- h2c->conn->flags |= CO_FL_PRIVATE;
if (h2c->conn->flags & CO_FL_PRIVATE) {
if (!h2c->conn->owner) {
h2c->conn->owner = sess;