Skip to content

Commit

Permalink
Fix infinite encrypting screen on miss configured ip-forwarding
Browse files Browse the repository at this point in the history
  • Loading branch information
Outfluencer authored Sep 15, 2024
1 parent a89cf5f commit e75efdd
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions proxy/src/main/java/net/md_5/bungee/ServerConnector.java
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,15 @@ public void connected(ChannelWrapper channel) throws Exception
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( "probably miss configured ip-forwarding" );
}
}

@Override
Expand Down

0 comments on commit e75efdd

Please sign in to comment.