mirror of
https://github.com/GravitLauncher/Launcher
synced 2025-06-05 13:57:00 +03:00
[FIX] Add writeLock for Client in launchserver.config.reload
This commit is contained in:
parent
b8f6857ef2
commit
1e4e1c5837
1 changed files with 8 additions and 1 deletions
|
@ -226,8 +226,15 @@ public void reload(ReloadType type) throws Exception {
|
|||
if(!type.equals(ReloadType.NO_AUTH)) {
|
||||
nettyServerSocketHandler.nettyServer.service.forEachActiveChannels((channel, wsHandler) -> {
|
||||
Client client = wsHandler.getClient();
|
||||
if(client.auth != null) {
|
||||
var lock = client.writeLock();
|
||||
lock.lock();
|
||||
try {
|
||||
if (client.auth_id == null) {
|
||||
return;
|
||||
}
|
||||
client.auth = config.getAuthProviderPair(client.auth_id);
|
||||
} finally {
|
||||
lock.unlock();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue