Skip to content

Commit

Permalink
Made loadbalancer resort after opening/closing a server.
Browse files Browse the repository at this point in the history
  • Loading branch information
TheDeafCreeper committed Oct 10, 2023
1 parent fb188aa commit ec0482a
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -122,13 +122,17 @@ public void openServer(PlayerServer server) {
if (!this.closedServers.contains(server)) return;
this.closedServers.remove(server);
this.loadBalancer.add(server);

this.loadBalancer.completeSort();
}

@Override
public void closeServer(PlayerServer server) {
if (!this.loadBalancer.dump().contains(server)) return;
this.loadBalancer.remove(server);
this.closedServers.add(server);

this.loadBalancer.completeSort();
}

@Override
Expand Down

0 comments on commit ec0482a

Please sign in to comment.