diff --git a/include/proto/stream.h b/include/proto/stream.h index 938c58de5..f3fb095ff 100644 --- a/include/proto/stream.h +++ b/include/proto/stream.h @@ -296,11 +296,16 @@ static void inline stream_inc_http_err_ctr(struct stream *s) } } +static void inline __stream_add_srv_conn(struct stream *sess, struct server *srv) +{ + sess->srv_conn = srv; + LIST_ADD(&srv->actconns, &sess->by_srv); +} + static void inline stream_add_srv_conn(struct stream *sess, struct server *srv) { HA_SPIN_LOCK(SERVER_LOCK, &srv->lock); - sess->srv_conn = srv; - LIST_ADD(&srv->actconns, &sess->by_srv); + __stream_add_srv_conn(sess, srv); HA_SPIN_UNLOCK(SERVER_LOCK, &srv->lock); } diff --git a/src/queue.c b/src/queue.c index 1796ac147..1dea7d53b 100644 --- a/src/queue.c +++ b/src/queue.c @@ -124,7 +124,7 @@ static struct stream *pendconn_get_next_strm(struct server *srv, struct proxy *p /* we want to note that the stream has now been assigned a server */ strm->flags |= SF_ASSIGNED; strm->target = &srv->obj_type; - stream_add_srv_conn(strm, srv); + __stream_add_srv_conn(strm, srv); HA_ATOMIC_ADD(&srv->served, 1); HA_ATOMIC_ADD(&srv->proxy->served, 1); if (px->lbprm.server_take_conn)