mirror of
https://github.com/SpigotMC/BungeeCord.git
synced 2024-12-25 18:17:38 +01:00
Close #819 - remove trailing . from hostname if it exists
This commit is contained in:
parent
aa91354666
commit
dae96ac18b
@ -198,6 +198,13 @@ public class InitialHandler extends PacketHandler implements PendingConnection
|
||||
{
|
||||
Preconditions.checkState( thisState == State.HANDSHAKE, "Not expecting HANDSHAKE" );
|
||||
this.handshake = handshake;
|
||||
|
||||
// SRV records can end with a . depending on DNS / client.
|
||||
if ( handshake.getHost().endsWith( "." ) )
|
||||
{
|
||||
handshake.setHost( handshake.getHost().substring( 0, handshake.getHost().length() - 1 ) );
|
||||
}
|
||||
|
||||
this.vHost = new InetSocketAddress( handshake.getHost(), handshake.getPort() );
|
||||
bungee.getLogger().log( Level.INFO, "{0} has connected", this );
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user