summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 17a04c7)
raw | patch | inline | side by side (parent: 17a04c7)
author | Luke Heberling <collectd@c-ware.com> | |
Thu, 20 Aug 2009 12:08:53 +0000 (14:08 +0200) | ||
committer | Florian Forster <octo@huhu.verplant.org> | |
Thu, 20 Aug 2009 12:08:53 +0000 (14:08 +0200) |
→ See also: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=535787
src/powerdns.c | patch | blob | history |
diff --git a/src/powerdns.c b/src/powerdns.c
index 164137ba39da5f9019bf037faff07efbafea1c26..09ad83534cdda6bb6cf913c3ae9da409bdbffffd 100644 (file)
--- a/src/powerdns.c
+++ b/src/powerdns.c
break;
}
+ struct timeval timeout;
+ timeout.tv_sec=2;
+ if (timeout.tv_sec < interval_g * 3 / 4)
+ timeout.tv_sec = interval_g * 3 / 4;
+ timeout.tv_usec=0;
+ status = setsockopt (sd, SOL_SOCKET, SO_RCVTIMEO, &timeout, sizeof (timeout));
+ if (status != 0)
+ {
+ FUNC_ERROR ("setsockopt");
+ break;
+ }
+
status = connect (sd, (struct sockaddr *) &item->sockaddr,
sizeof (item->sockaddr));
if (status != 0)