提交 e9930948 编写于 作者: W weijun

6955783: ServiceUnavailableException caught even the secondary DNS is available

Reviewed-by: vinnie
上级 35679bbf
......@@ -525,11 +525,11 @@ public class DnsClient {
}
byte[] pkt;
if ((pkt = (byte[]) resps.get(xid)) != null) {
checkResponseCode(new Header(pkt, pkt.length));
synchronized (queuesLock) {
resps.remove(xid);
reqs.remove(xid);
}
checkResponseCode(new Header(pkt, pkt.length));
if (debug) {
dprint("FOUND (" + Thread.currentThread() +
......@@ -562,12 +562,12 @@ public class DnsClient {
dprint("XID MATCH:" + xid);
}
checkResponseCode(hdr);
// remove the response for the xid if received by some other thread.
synchronized (queuesLock) {
resps.remove(xid);
reqs.remove(xid);
}
checkResponseCode(hdr);
return true;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册