Readjusted a number function names.
[awesomized/libmemcached] / lib / memcached_quit.c
index 24a88c2d9c0d2d2ce56ef4ac6c0a59c2b3b65084..8481b990e8a45e19831e44981b1571e73dc6c333 100644 (file)
@@ -13,9 +13,13 @@ void memcached_quit(memcached_st *ptr)
   {
     for (x= 0; x < ptr->number_of_hosts; x++)
     {
-      if (ptr->hosts[x].fd > 0)
+      if (ptr->hosts[x].fd != -1)
+      {
         close(ptr->hosts[x].fd);
+        ptr->hosts[x].fd= -1;
+      }
     }
   }
+
   ptr->connected= 0;
 }