7155051: DNS provider may return incorrect results

Reviewed-by: weijun, chegar
This commit is contained in:
Xue-Lei Andrew Fan 2012-03-26 21:21:55 -07:00
parent c0c3fb980d
commit ce4e70b60b

View File

@ -577,8 +577,8 @@ public class DnsClient {
// enqueue only the first response, responses for retries are ignored.
//
synchronized (queuesLock) {
if (reqs.contains(xid)) { // enqueue only the first response
resps.put(xid, pkt);
if (reqs.contains(hdr.xid)) { // enqueue only the first response
resps.put(hdr.xid, pkt);
}
}