mirror of
https://github.com/BGHDDevelopment/PlayerBalancer.git
synced 2025-02-16 20:21:26 +01:00
fix(pafvelocity): only unlock the player after the connection request is processed
This commit is contained in:
parent
7b7c1d6cb5
commit
b676aacbf2
@ -29,8 +29,11 @@ public class PBServerConnector implements ServerConnector {
|
||||
@Override
|
||||
public void connect(Player player, RegisteredServer registeredServer) {
|
||||
PlayerLocker.lock(player);
|
||||
player.createConnectionRequest(registeredServer).fireAndForget();
|
||||
PlayerLocker.unlock(player);
|
||||
player.createConnectionRequest(registeredServer)
|
||||
.connectWithIndication()
|
||||
.whenComplete((result, throwable) -> {
|
||||
PlayerLocker.unlock(player);
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user