diff --git a/cvdupdate/cvdupdate.py b/cvdupdate/cvdupdate.py index 4d5b8df..1d10e22 100644 --- a/cvdupdate/cvdupdate.py +++ b/cvdupdate/cvdupdate.py @@ -548,7 +548,12 @@ def _query_cvd_version_dns(self, db: str) -> int: if self.dns_version_tokens == []: # Query DNS if we haven't already - self._query_dns_txt_entry() + for _attempt in range(self.config['max retry']): + if self._query_dns_txt_entry(): + break + # Pause before next attempt. + time.sleep(0.1) + if self.dns_version_tokens == []: # Query failed. Bail out. return version