From 649119493ba6295bc51a9e20aa12a73938664196 Mon Sep 17 00:00:00 2001 From: Darien Raymond Date: Sat, 10 Mar 2018 09:34:38 +0100 Subject: [PATCH] remove pending request from cache when error. fixes #942 --- app/dns/nameserver.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/dns/nameserver.go b/app/dns/nameserver.go index f3e19e04..88e9c26a 100644 --- a/app/dns/nameserver.go +++ b/app/dns/nameserver.go @@ -177,6 +177,9 @@ func (s *UDPNameServer) QueryA(domain string) <-chan *ARecord { b, err := msgToBuffer(msg) if err != nil { newError("failed to build A query for domain ", domain).Base(err).WriteToLog() + s.Lock() + delete(s.requests, id) + s.Unlock() close(response) return response }