Merge pull request #523 from BartolomeoDR/patch-1

[FIX] Fixed issue where user is unable to play/start the modpack after logout
This commit is contained in:
Gravit 2021-10-17 12:35:31 +07:00 committed by GitHub
commit 7bcf5f10ab
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 2 deletions

View file

@ -36,9 +36,14 @@ public class Client {
public Map<String, String> serializableProperties; public Map<String, String> serializableProperties;
public transient AtomicInteger refCount = new AtomicInteger(1); public transient AtomicInteger refCount;
public Client(UUID session) { public Client(UUID session) {
this(session, 1);
}
public Client(UUID session, int initialRefCount) {
refCount = new AtomicInteger(initialRefCount);
this.session = session; this.session = session;
timestamp = System.currentTimeMillis(); timestamp = System.currentTimeMillis();
type = null; type = null;

View file

@ -45,7 +45,7 @@ public void execute(ChannelHandlerContext ctx, Client client) {
sendError("Exit internal error"); sendError("Exit internal error");
return; return;
} }
Client newClient = new Client(null); Client newClient = new Client(null, 0);
newClient.checkSign = client.checkSign; newClient.checkSign = client.checkSign;
handler.setClient(newClient); handler.setClient(newClient);
AuthSupportExit supportExit = client.auth.core.isSupport(AuthSupportExit.class); AuthSupportExit supportExit = client.auth.core.isSupport(AuthSupportExit.class);