summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: fe69cd3)
raw | patch | inline | side by side (parent: fe69cd3)
author | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Mon, 25 Aug 2008 18:03:12 +0000 (20:03 +0200) | ||
committer | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Mon, 25 Aug 2008 18:03:12 +0000 (20:03 +0200) |
poll(2) takes a timeout in milliseconds, not seconds. Multiply
`interval_g' by 1000 before passing it to `poll'.
Thanks to Joost Cassee <joost at cassee.net> for helping debug this.
`interval_g' by 1000 before passing it to `poll'.
Thanks to Joost Cassee <joost at cassee.net> for helping debug this.
src/memcached.c | patch | blob | history |
diff --git a/src/memcached.c b/src/memcached.c
index 8d6f72811969760bf6573b5fed7f4956bf0c4d8c..c3fa06b72b78401e38efb63b4f8c44440b9558f6 100644 (file)
--- a/src/memcached.c
+++ b/src/memcached.c
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)