Skip to content

Commit

Permalink
#3743: 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 and md-5 committed Oct 6, 2024
1 parent 9813e46 commit 2bacf65
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( "Unexpected disconnect during server login, did you forget to enable BungeeCord / IP forwarding on your server?" );
}
}

@Override
Expand Down

5 comments on commit 2bacf65

@andreasdc
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For me it happens when users connect to a whitelisted servers, I don't know if it should work like that.

@Outfluencer
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i this case the kick should be forwarded to the player i think. i will look it up

@Outfluencer
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i can't reproduce
Image

@andreasdc
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You just did

@Janmm14
Copy link
Contributor

@Janmm14 Janmm14 commented on 2bacf65 Oct 11, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Before, a kick during attempted server switch - after having an established connection - would just display in chat. @Outfluencer

Edit: See #3753

Please sign in to comment.