From cd655351b8f00057f170cede81888f69bb43a5b1 Mon Sep 17 00:00:00 2001 From: willy tarreau Date: Sat, 29 Apr 2006 12:11:46 +0200 Subject: [PATCH] [MEDIUM] it was not possible to balance between backup servers in source hash mode. --- haproxy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/haproxy.c b/haproxy.c index be05a76db4..319c9537d0 100644 --- a/haproxy.c +++ b/haproxy.c @@ -2041,7 +2041,7 @@ static inline struct server *get_server_sh(struct proxy *px, char *addr, int len return NULL; l = h = 0; - if (px->srv_act > 1) { + if (px->srv_act > 1 || (px->srv_act == 0 && px->srv_bck > 1)) { while ((l + sizeof (int)) <= len) { h ^= ntohl(*(unsigned int *)(&addr[l])); l += sizeof (int);