From: Simon Horman Date: Fri, 12 Aug 2011 23:03:48 +0000 (+0900) Subject: [MEDIUM] Fix stick-table replication on soft-restart X-Git-Tag: v1.5-dev8~153 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8b7b05a92d3e41c5334d6cd9de56a96aab278535;p=thirdparty%2Fhaproxy.git [MEDIUM] Fix stick-table replication on soft-restart "[MINOR] session: add a pointer to the new target into the session" (664beb8) introduced a regression by changing the type of a peer's target from TARG_TYPE_PROXY to TARG_TYPE_NONE. The effect of this is that during a soft-restart the new process no longer tries to connect to the old process to replicate its stick tables. This patch sets the type of a peer's target as TARG_TYPE_PROXY and replication on soft-restart works once again. --- diff --git a/src/peers.c b/src/peers.c index 46a917843b..26a3154b79 100644 --- a/src/peers.c +++ b/src/peers.c @@ -1184,7 +1184,7 @@ static struct session *peer_session_create(struct peer *peer, struct peer_sessio s->si[1].release = NULL; session_init_srv_conn(s); - clear_target(&s->target); + set_target_proxy(&s->target, s->be); s->pend_pos = NULL; /* init store persistence */