Перевод конфигов на Json часть 7

Порция фиксов
Комплируется, пока не работает
This commit is contained in:
Gravit 2018-12-24 00:45:16 +07:00
parent 137b83f428
commit 28cb9b0f23
No known key found for this signature in database
GPG key ID: 061981E1E85D3216
4 changed files with 6 additions and 3 deletions

View file

@ -1,5 +1,6 @@
package ru.gravit.launchserver.auth.handler; package ru.gravit.launchserver.auth.handler;
import com.google.gson.annotations.Expose;
import ru.gravit.launcher.NeedGarbageCollection; import ru.gravit.launcher.NeedGarbageCollection;
import ru.gravit.launchserver.auth.provider.AuthProviderResult; import ru.gravit.launchserver.auth.provider.AuthProviderResult;
import ru.gravit.utils.helper.CommonHelper; 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); this.serverID = serverID == null ? null : VerifyHelper.verifyServerID(serverID);
} }
} }
@Expose(serialize = false, deserialize = false)
private final Map<UUID, Entry> entryCache = new HashMap<>(1024); private final Map<UUID, Entry> entryCache = new HashMap<>(1024);
@Expose(serialize = false, deserialize = false)
private final Map<String, UUID> usernamesCache = new HashMap<>(1024); private final Map<String, UUID> usernamesCache = new HashMap<>(1024);

View file

@ -42,7 +42,7 @@ public static void registerProviders() {
} }
public AuthHandler getAccociateHandler(int this_position) { public AuthHandler getAccociateHandler(int this_position) {
return server.config.authHandler[this_position]; return server.config.authHandler[0];
} }

View file

@ -92,6 +92,7 @@ public void reply() throws Exception {
} }
server.config.hwidHandler.check(OshiHWID.gson.fromJson(hwid_str, OshiHWID.class), result.username); server.config.hwidHandler.check(OshiHWID.gson.fromJson(hwid_str, OshiHWID.class), result.username);
} catch (AuthException | HWIDException e) { } catch (AuthException | HWIDException e) {
if(e.getMessage() == null) LogHelper.error(e);
requestError(e.getMessage()); requestError(e.getMessage());
return; return;
} catch (Exception e) { } catch (Exception e) {

View file

@ -112,6 +112,7 @@ public void run() {
respond(handshake.type, input, output, handshake.session, IOHelper.getIP(socket.getRemoteSocketAddress())); respond(handshake.type, input, output, handshake.session, IOHelper.getIP(socket.getRemoteSocketAddress()));
} catch (RequestException e) { } catch (RequestException e) {
LogHelper.subDebug(String.format("#%d Request error: %s", handshake.session, e.getMessage())); LogHelper.subDebug(String.format("#%d Request error: %s", handshake.session, e.getMessage()));
if(e.getMessage() == null) LogHelper.error(e);
output.writeString(e.getMessage(), 0); output.writeString(e.getMessage(), 0);
} }
} catch (Exception e) { } catch (Exception e) {