提交 a57b19bb 编写于 作者: A andrew

Merge

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