Exemplo n.º 1
0
 def loop2(self, iterator, nameserver):
   """
   Inner loop.  Send query to next nameserver in our list, unless
   we've hit the overall timeout for this query.
   """
   self.timer.cancel()
   try:
     timeout = resolver._compute_timeout(self.start)
   except dns.resolver.Timeout, e:
     self.lose(e)
Exemplo n.º 2
0
 def loop2(self, iterator, nameserver):
     """
 Inner loop.  Send query to next nameserver in our list, unless
 we've hit the overall timeout for this query.
 """
     self.timer.cancel()
     try:
         timeout = resolver._compute_timeout(self.start)
     except dns.resolver.Timeout, e:
         self.lose(e)
Exemplo n.º 3
0
 def done2(self):
   """
   Done with inner loop.  If we still haven't got an answer and
   haven't (yet?) eliminated all of our nameservers, wait a little
   while before starting the cycle again, unless we've hit the
   timeout threshold for the whole query.
   """
   if self.response is None and self.nameservers:
     try:
       delay = rpki.sundial.timedelta(seconds = min(resolver._compute_timeout(self.start), self.backoff))
       self.backoff *= 2
       self.timer.set_handler(self.loop1)
       self.timer.set_errback(self.lose)
       self.timer.set(delay)
     except dns.resolver.Timeout, e:
       self.lose(e)
Exemplo n.º 4
0
 def done2(self):
     """
 Done with inner loop.  If we still haven't got an answer and
 haven't (yet?) eliminated all of our nameservers, wait a little
 while before starting the cycle again, unless we've hit the
 timeout threshold for the whole query.
 """
     if self.response is None and self.nameservers:
         try:
             delay = rpki.sundial.timedelta(seconds=min(
                 resolver._compute_timeout(self.start), self.backoff))
             self.backoff *= 2
             self.timer.set_handler(self.loop1)
             self.timer.set_errback(self.lose)
             self.timer.set(delay)
         except dns.resolver.Timeout, e:
             self.lose(e)