mirror of
https://github.com/GeyserMC/MCProtocolLib.git
synced 2024-12-04 21:01:02 -05:00
Update dnsjava to 3.1.0 and add result to debug output.
This commit is contained in:
parent
d82b1b688d
commit
12d26014fa
2 changed files with 4 additions and 3 deletions
2
pom.xml
2
pom.xml
|
@ -55,7 +55,7 @@
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>dnsjava</groupId>
|
<groupId>dnsjava</groupId>
|
||||||
<artifactId>dnsjava</artifactId>
|
<artifactId>dnsjava</artifactId>
|
||||||
<version>3.0.2</version>
|
<version>3.1.0</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<!-- Silence dnsjava slf4j warnings -->
|
<!-- Silence dnsjava slf4j warnings -->
|
||||||
<dependency>
|
<dependency>
|
||||||
|
|
|
@ -108,7 +108,8 @@ public class TcpClientSession extends TcpSession {
|
||||||
int port = getPort();
|
int port = getPort();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
Record[] records = new Lookup(getPacketProtocol().getSRVRecordPrefix() + "._tcp." + host, Type.SRV).run();
|
Lookup lookup = new Lookup(getPacketProtocol().getSRVRecordPrefix() + "._tcp." + host, Type.SRV);
|
||||||
|
Record[] records = lookup.run();
|
||||||
if(records != null && records.length > 0) {
|
if(records != null && records.length > 0) {
|
||||||
SRVRecord srv = (SRVRecord) records[0];
|
SRVRecord srv = (SRVRecord) records[0];
|
||||||
|
|
||||||
|
@ -119,7 +120,7 @@ public class TcpClientSession extends TcpSession {
|
||||||
System.out.println("[PacketLib] Found SRV record for \"" + host + ":" + port + "\".");
|
System.out.println("[PacketLib] Found SRV record for \"" + host + ":" + port + "\".");
|
||||||
}
|
}
|
||||||
} else if(debug) {
|
} else if(debug) {
|
||||||
System.out.println("[PacketLib] No SRV records found.");
|
System.out.println("[PacketLib] No SRV records found; resolver returned \"" + lookup.getErrorString() + "\".");
|
||||||
}
|
}
|
||||||
} catch(TextParseException e) {
|
} catch(TextParseException e) {
|
||||||
if(debug) {
|
if(debug) {
|
||||||
|
|
Loading…
Reference in a new issue