Fixed service unexpectedly stop
This commit is contained in:
parent
9919375111
commit
0b3f5e671a
@ -235,10 +235,14 @@ public class UdpDnsProvider extends DnsProvider {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void handleRawDnsResponse(IpPacket parsedPacket, DatagramSocket dnsSocket) throws IOException {
|
private void handleRawDnsResponse(IpPacket parsedPacket, DatagramSocket dnsSocket) throws IOException {
|
||||||
byte[] datagramData = new byte[1024];
|
try {
|
||||||
DatagramPacket replyPacket = new DatagramPacket(datagramData, datagramData.length);
|
byte[] datagramData = new byte[1024];
|
||||||
dnsSocket.receive(replyPacket);
|
DatagramPacket replyPacket = new DatagramPacket(datagramData, datagramData.length);
|
||||||
handleDnsResponse(parsedPacket, datagramData);
|
dnsSocket.receive(replyPacket);
|
||||||
|
handleDnsResponse(parsedPacket, datagramData);
|
||||||
|
} catch (Exception e) {
|
||||||
|
Logger.logException(e);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user