summaryrefslogtreecommitdiff
path: root/proxy_ring_hash.c
diff options
context:
space:
mode:
Diffstat (limited to 'proxy_ring_hash.c')
-rw-r--r--proxy_ring_hash.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/proxy_ring_hash.c b/proxy_ring_hash.c
index e3fa3f3..c04e323 100644
--- a/proxy_ring_hash.c
+++ b/proxy_ring_hash.c
@@ -332,6 +332,9 @@ static int ketama_new(lua_State *L) {
_add_server_twemproxy(kt, hashstring_size, parts, bucket_size, id, &cont);
break;
case MODE_EVCACHE:
+ // EVCache uses the ipaddress couple of times, we need to factor that in
+ // when calculating the hashstring_size
+ hashstring_size += partlens[0];
_add_server_evcache(kt, hashstring_size, parts, bucket_size, id, &cont);
break;
}