Commit d42e9e19 authored by Damian Johnson's avatar Damian Johnson
Browse files

Invalidate cache on DNS_USELESS event

Irc discussion Dave partook in indicated that we should flush our cache when we
receive a DNS_USELESS event, not just EXTERNAL_ADDRESS.

  https://trac.torproject.org/projects/tor/ticket/26129
parent 542fa1f6
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1078,7 +1078,7 @@ class Controller(BaseController):
    self.add_event_listener(_confchanged_listener, EventType.CONF_CHANGED)

    def _address_changed_listener(event):
      if event.action == 'EXTERNAL_ADDRESS':
      if event.action in ('EXTERNAL_ADDRESS', 'DNS_USELESS'):
        self._set_cache({'exit_policy': None})
        self._set_cache({'address': None}, 'getinfo')
        self._last_address_exc = None