summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: d8a5927)
raw | patch | inline | side by side (parent: d8a5927)
author | Jim Radford <radford@galvanix.com> | |
Wed, 7 Aug 2013 20:05:47 +0000 (13:05 -0700) | ||
committer | Florian Forster <octo@collectd.org> | |
Thu, 8 Aug 2013 07:32:30 +0000 (09:32 +0200) |
Signed-off-by: Florian Forster <octo@collectd.org>
src/memcached.c | patch | blob | history |
diff --git a/src/memcached.c b/src/memcached.c
index a09f45ec6dae1a2e537fe986af7677f4130bd662..2a5e0f0f0845ed6a7361982c541efbab3b996603 100644 (file)
--- a/src/memcached.c
+++ b/src/memcached.c
return (-1);
}
return (-1);
}
+ /* connect to the memcached daemon */
+ int status = connect (fd, (struct sockaddr *)&serv_addr, sizeof(serv_addr));
+ if (status != 0)
+ {
+ shutdown (fd, SHUT_RDWR);
+ close (fd);
+ fd = -1;
+ }
+
return (fd);
} /* int memcached_connect_unix */
return (fd);
} /* int memcached_connect_unix */