1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-06-10 18:00:43 +00:00

remove pending request from cache when error. fixes #942

This commit is contained in:
Darien Raymond 2018-03-10 09:34:38 +01:00
parent fda85506c8
commit 649119493b
No known key found for this signature in database
GPG Key ID: 7251FFA14BB18169

View File

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