From d1bc03664beddc17658f6633733162fd04dc93eb Mon Sep 17 00:00:00 2001 From: BartolomeoDR Date: Sat, 16 Oct 2021 14:27:48 +0300 Subject: [PATCH] Update Client.java Added ability to customize refCount value of a client --- .../main/java/pro/gravit/launchserver/socket/Client.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/Client.java b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/Client.java index 4ce6a1ad..382496c8 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/Client.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/Client.java @@ -36,9 +36,14 @@ public class Client { public Map serializableProperties; - public transient AtomicInteger refCount = new AtomicInteger(1); + public transient AtomicInteger refCount; public Client(UUID session) { + this(session, 1); + } + + public Client(UUID session, int initialRefCount) { + refCount = new AtomicInteger(initialRefCount); this.session = session; timestamp = System.currentTimeMillis(); type = null;