+ unsigned int x;
+
+ if (ptr->hosts)
+ {
+ for (x= 0; x < ptr->number_of_hosts; x++)
+ {
+ if (ptr->hosts[x].fd != -1)
+ {
+ if (ptr->flags & MEM_NO_BLOCK)
+ memcached_io_write(ptr, x, "quit\r\n", 6, 1);
+ close(ptr->hosts[x].fd);
+ ptr->hosts[x].fd= -1;
+ }
+ }
+ }
+
+ ptr->connected= 0;