remove pending request from cache when error. fixes #942

pull/946/head
Darien Raymond 7 years ago
parent fda85506c8
commit 649119493b
No known key found for this signature in database
GPG Key ID: 7251FFA14BB18169

@ -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
}

Loading…
Cancel
Save