mirror of
https://github.com/GeyserMC/MCProtocolLib.git
synced 2024-12-12 08:41:00 -05:00
Check if DNS lookup result is null.
This commit is contained in:
parent
b98e525016
commit
43b394dfdc
1 changed files with 1 additions and 1 deletions
|
@ -106,7 +106,7 @@ public class TcpClientSession extends TcpSession {
|
|||
|
||||
try {
|
||||
Record[] records = new Lookup(getPacketProtocol().getSRVRecordPrefix() + "._tcp." + host, Type.SRV).run();
|
||||
if(records.length > 0) {
|
||||
if(records != null && records.length > 0) {
|
||||
SRVRecord srv = (SRVRecord) records[0];
|
||||
|
||||
host = srv.getTarget().toString().replaceFirst("\\.$", "");
|
||||
|
|
Loading…
Reference in a new issue