-2005-07-31 Bob Halley <halley@nominum.com>
+2005-09-29 Bob Halley <halley@dnspython.org>
+
+ * dns/resolver.py (Resolver._compute_timeout): If time goes
+ backwards a little bit, ignore it.
+
+2005-07-31 Bob Halley <halley@dnspython.org>
* (Version 1.3.4 released)
def _compute_timeout(self, start):
now = time.time()
if now < start:
- # Time going backwards is bad. Just give up.
- raise Timeout
+ if start - now > 1:
+ # Time going backwards is bad. Just give up.
+ raise Timeout
+ else:
+ # Time went backwards, but only a little. This can
+ # happen, e.g. under vmware with older linux kernels.
+ # Pretend it didn't happen.
+ now = start
duration = now - start
if duration >= self.lifetime:
raise Timeout