Skip to content

Commit

Permalink
#3711, #3712: Don't try to reconnect player when it disconnects manually
Browse files Browse the repository at this point in the history
* Set server obsolete when disconnected by the proxy
  • Loading branch information
Raraph84 authored Jul 28, 2024
1 parent 8b195d1 commit a57adcc
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 2 deletions.
1 change: 1 addition & 0 deletions proxy/src/main/java/net/md_5/bungee/ServerConnection.java
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ public void disconnect(BaseComponent... reason)
{
Preconditions.checkArgument( reason.length == 0, "Server cannot have disconnect reason" );

isObsolete = true;
ch.close();
}

Expand Down
1 change: 0 additions & 1 deletion proxy/src/main/java/net/md_5/bungee/ServerConnector.java
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,6 @@ private void cutThrough(ServerConnection server)
// Remove from old servers
if ( user.getServer() != null )
{
user.getServer().setObsolete( true );
user.getServer().disconnect( "Quitting" );
}

Expand Down
1 change: 0 additions & 1 deletion proxy/src/main/java/net/md_5/bungee/UserConnection.java
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,6 @@ public void disconnect0(final BaseComponent reason)

if ( server != null )
{
server.setObsolete( true );
server.disconnect( "Quitting" );
}
}
Expand Down

0 comments on commit a57adcc

Please sign in to comment.