From: Florian Forster Date: Mon, 25 Aug 2008 18:03:12 +0000 (+0200) Subject: memcached plugin: Wait for a *little* longer for the memcached to answer. X-Git-Tag: collectd-4.3.4~7 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=801067164e6eb068f5b5b2c45638fd207d5084ff;p=collectd.git memcached plugin: Wait for a *little* longer for the memcached to answer. poll(2) takes a timeout in milliseconds, not seconds. Multiply `interval_g' by 1000 before passing it to `poll'. Thanks to Joost Cassee for helping debug this. --- diff --git a/src/memcached.c b/src/memcached.c index 8d6f7281..c3fa06b7 100644 --- a/src/memcached.c +++ b/src/memcached.c @@ -134,7 +134,7 @@ static int memcached_query_daemon (char *buffer, int buffer_size) /* {{{ */ p.events = POLLIN | POLLERR | POLLHUP; p.revents = 0; - status = poll (&p, /* nfds = */ 1, /* timeout = */ interval_g); + status = poll (&p, /* nfds = */ 1, /* timeout = */ 1000 * interval_g); if (status <= 0) { if (status == 0)