summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamian Johnson <atagar@torproject.org>2018-08-04 15:23:05 -0700
committerDamian Johnson <atagar@torproject.org>2018-08-04 15:23:05 -0700
commitd42e9e1953ab5eac3677e16c51c1a4c28ef965ec (patch)
tree940a185b98d010db8661de2618696f2471edeaf9
parent542fa1f60552c259e3510e27727a5a2d5f20b7e9 (diff)
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
-rw-r--r--stem/control.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/stem/control.py b/stem/control.py
index 19a8759d..7e1d1286 100644
--- a/stem/control.py
+++ b/stem/control.py
@@ -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