projects
/
m6w6
/
libmemcached
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
Fix failing issue in memstat
[m6w6/libmemcached]
/
lib
/
memcached_quit.c
diff --git
a/lib/memcached_quit.c
b/lib/memcached_quit.c
index 24a88c2d9c0d2d2ce56ef4ac6c0a59c2b3b65084..89a55ecf43c96f0739152c1c851917d48bfd8c03 100644
(file)
--- a/
lib/memcached_quit.c
+++ b/
lib/memcached_quit.c
@@
-1,4
+1,4
@@
-#include
<memcached.h>
+#include
"common.h"
/*
This closes all connections (forces flush of input as well).
/*
This closes all connections (forces flush of input as well).
@@
-13,9
+13,13
@@
void memcached_quit(memcached_st *ptr)
{
for (x= 0; x < ptr->number_of_hosts; x++)
{
{
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);
close(ptr->hosts[x].fd);
+ ptr->hosts[x].fd= -1;
+ }
}
}
}
}
+
ptr->connected= 0;
}
ptr->connected= 0;
}