fix warnings
[awesomized/libmemcached] / test / lib / Cluster.cpp
index ee7fcbf24f409596fd5f6d404970f7abeea9002e..e1375bfde90ed50c65fcb52a3f0cff54c3be35fa 100644 (file)
@@ -7,11 +7,11 @@ Cluster::Cluster(Server serv, uint16_t cnt)
 : count{cnt}
 , proto{move(serv)}
 {
-  if (!cnt) {
-    count = thread::hardware_concurrency()/2;
-    if (count < 4) {
-      count = 4;
-    }
+  if (count < 4) {
+      count = stoi(getenv_else("MEMCACHED_CLUSTER", "4"));
+  }
+  if (!count) {
+    count = 1;
   }
   reset();
 }