Optimization around connect.
[m6w6/libmemcached] / libmemcached / behavior.c
index f1573b608653e86dc0629b4438736130c835fcde..2f5311e5a01ddac70d96cc9c36576983d3b66f79 100644 (file)
@@ -55,6 +55,7 @@ memcached_return_t memcached_behavior_set(memcached_st *ptr,
     ptr->server_failure_limit= (uint32_t)data;
     break;
   case MEMCACHED_BEHAVIOR_BINARY_PROTOCOL:
+    memcached_quit(ptr); // We need t shutdown all of the connections to make sure we do the correct protocol
     if (data)
     {
       ptr->flags.verify_key= false;