[FIX] NPE in SessionManager

This commit is contained in:
Gravit 2020-10-28 00:55:32 +07:00
parent 94e60c3e51
commit aee051627b
No known key found for this signature in database
GPG key ID: 98A079490768CCE5

View file

@ -9,6 +9,7 @@
import java.util.*;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.function.Function;
import java.util.stream.Collectors;
@ -44,7 +45,7 @@ private Client restoreFromString(String data) {
result.daoObject = server.config.dao.userDAO.findByUsername(result.username);
}
}
if(result.refCount == null) result.refCount = new AtomicInteger(1);
return result;
}