#3743: Fix infinite encrypting screen on miss configured ip-forwarding

This commit is contained in:
Outfluencer 2024-09-15 22:33:20 +02:00 committed by md_5
parent 9813e46e66
commit 2bacf6572b
No known key found for this signature in database
GPG Key ID: E8E901AC7C617C11

View File

@ -137,6 +137,15 @@ public class ServerConnector extends PacketHandler
public void disconnected(ChannelWrapper channel) throws Exception
{
user.getPendingConnects().remove( target );
if ( !obsolete && user.getPendingConnects().isEmpty() && thisState == State.LOGIN_SUCCESS )
{
// this is called if we get disconnected but not have received any response after we send the handshake
// in this case probably an exception was thrown because the handshake could not be read correctly
// because of the extra ip forward data, also we skip the disconnect if another server is also in the
// pendingConnects queue because we don't want to lose the player
user.disconnect( "Unexpected disconnect during server login, did you forget to enable BungeeCord / IP forwarding on your server?" );
}
}
@Override