- if (memcached_behavior_get(ptr->root, MEMCACHED_BEHAVIOR_AUTO_EJECT_HOSTS))
- run_distribution(ptr->root);
+ memcached_st *root= (memcached_st *)ptr->root;
+ // @todo fix this by fixing behavior to no longer make use of
+ // memcached_st
+ if (memcached_behavior_get(root, MEMCACHED_BEHAVIOR_AUTO_EJECT_HOSTS))
+ {
+ run_distribution(root);
+ }
+
+ root->last_disconnected_server = ptr;