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" );
|
Preconditions.checkState( thisState == State.HANDSHAKE, "Not expecting HANDSHAKE" );
|
||||||
this.handshake = 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() );
|
this.vHost = new InetSocketAddress( handshake.getHost(), handshake.getPort() );
|
||||||
bungee.getLogger().log( Level.INFO, "{0} has connected", this );
|
bungee.getLogger().log( Level.INFO, "{0} has connected", this );
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user