don't cache server name lookups indefinitely (#436)

Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
Jason Volk 2024-07-04 11:46:30 +00:00
parent eaf1cf38a5
commit dc18f89c0b
3 changed files with 30 additions and 2 deletions

View file

@ -122,6 +122,7 @@ impl Resolve for Hooked {
.read()
.expect("locked for reading")
.get(name.as_str())
.filter(|cached| cached.valid())
.cloned();
if let Some(cached) = cached {