Fixes condition where we were not correctly setting weighted vs not.
[m6w6/libmemcached] / libmemcached / behavior.cc
index 68e617d1410c6332b7d1bf5f9e69fd8efc072c18..fe489cf231bd7f6f1ad1b72ff290e898eac89b62 100644 (file)
@@ -489,7 +489,7 @@ memcached_return_t memcached_behavior_set_distribution(memcached_st *ptr, memcac
 {
   if (type < MEMCACHED_DISTRIBUTION_CONSISTENT_MAX)
   {
-    if (MEMCACHED_DISTRIBUTION_CONSISTENT_WEIGHTED)
+    if (type == MEMCACHED_DISTRIBUTION_CONSISTENT_WEIGHTED)
     {
       ptr->ketama.weighted= true;
     }