mirror of
https://github.com/GeyserMC/MCProtocolLib.git
synced 2024-12-04 12:51:09 -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>
|
||||
<groupId>dnsjava</groupId>
|
||||
<artifactId>dnsjava</artifactId>
|
||||
<version>3.0.2</version>
|
||||
<version>3.1.0</version>
|
||||
</dependency>
|
||||
<!-- Silence dnsjava slf4j warnings -->
|
||||
<dependency>
|
||||
|
|
|
@ -108,7 +108,8 @@ public class TcpClientSession extends TcpSession {
|
|||
int port = getPort();
|
||||
|
||||
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) {
|
||||
SRVRecord srv = (SRVRecord) records[0];
|
||||
|
||||
|
@ -119,7 +120,7 @@ public class TcpClientSession extends TcpSession {
|
|||
System.out.println("[PacketLib] Found SRV record for \"" + host + ":" + port + "\".");
|
||||
}
|
||||
} 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) {
|
||||
if(debug) {
|
||||
|
|
Loading…
Reference in a new issue