]> granicus.if.org Git - pdns/commitdiff
fix up sub-second waits for data - important for dnsreplay. Bug found by Augie Schwer
authorBert Hubert <bert.hubert@netherlabs.nl>
Tue, 21 Aug 2007 17:07:33 +0000 (17:07 +0000)
committerBert Hubert <bert.hubert@netherlabs.nl>
Tue, 21 Aug 2007 17:07:33 +0000 (17:07 +0000)
git-svn-id: svn://svn.powerdns.com/pdns/trunk/pdns@1088 d19b8d6e-7fed-0310-83ef-9ca221ded41b

pdns/misc.cc

index 0a28281f321f0c1de87ea1c14dd173866073bc07..75163a90692fafb09cef01ff244f7c591ef9e630 100644 (file)
@@ -288,7 +288,7 @@ int waitForRWData(int fd, bool waitForRead, int seconds, int useconds)
   else
     pfd.events=POLLOUT;
 
-  ret = poll(&pfd, 1, seconds * 1000);
+  ret = poll(&pfd, 1, seconds * 1000 + useconds/1000);
   if ( ret == -1 )
     errno = ETIMEDOUT;