mirror of
https://github.com/GravitLauncher/Launcher
synced 2024-11-15 03:31:15 +03:00
Перевод конфигов на Json часть 7
Порция фиксов Комплируется, пока не работает
This commit is contained in:
parent
137b83f428
commit
28cb9b0f23
4 changed files with 6 additions and 3 deletions
|
@ -1,5 +1,6 @@
|
|||
package ru.gravit.launchserver.auth.handler;
|
||||
|
||||
import com.google.gson.annotations.Expose;
|
||||
import ru.gravit.launcher.NeedGarbageCollection;
|
||||
import ru.gravit.launchserver.auth.provider.AuthProviderResult;
|
||||
import ru.gravit.utils.helper.CommonHelper;
|
||||
|
@ -28,9 +29,9 @@ public Entry(UUID uuid, String username, String accessToken, String serverID) {
|
|||
this.serverID = serverID == null ? null : VerifyHelper.verifyServerID(serverID);
|
||||
}
|
||||
}
|
||||
|
||||
@Expose(serialize = false, deserialize = false)
|
||||
private final Map<UUID, Entry> entryCache = new HashMap<>(1024);
|
||||
|
||||
@Expose(serialize = false, deserialize = false)
|
||||
private final Map<String, UUID> usernamesCache = new HashMap<>(1024);
|
||||
|
||||
|
||||
|
|
|
@ -42,7 +42,7 @@ public static void registerProviders() {
|
|||
}
|
||||
|
||||
public AuthHandler getAccociateHandler(int this_position) {
|
||||
return server.config.authHandler[this_position];
|
||||
return server.config.authHandler[0];
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -92,6 +92,7 @@ public void reply() throws Exception {
|
|||
}
|
||||
server.config.hwidHandler.check(OshiHWID.gson.fromJson(hwid_str, OshiHWID.class), result.username);
|
||||
} catch (AuthException | HWIDException e) {
|
||||
if(e.getMessage() == null) LogHelper.error(e);
|
||||
requestError(e.getMessage());
|
||||
return;
|
||||
} catch (Exception e) {
|
||||
|
|
|
@ -112,6 +112,7 @@ public void run() {
|
|||
respond(handshake.type, input, output, handshake.session, IOHelper.getIP(socket.getRemoteSocketAddress()));
|
||||
} catch (RequestException e) {
|
||||
LogHelper.subDebug(String.format("#%d Request error: %s", handshake.session, e.getMessage()));
|
||||
if(e.getMessage() == null) LogHelper.error(e);
|
||||
output.writeString(e.getMessage(), 0);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
|
|
Loading…
Reference in a new issue