Hopefully fixed auth timeout
This commit is contained in:
@@ -15,9 +15,21 @@ public class ServiceClient {
|
|||||||
private static Session session;
|
private static Session session;
|
||||||
public static UUID uuid;
|
public static UUID uuid;
|
||||||
|
|
||||||
|
public static void initialize() {
|
||||||
|
new Thread(() -> {
|
||||||
|
if (authenticate()) {
|
||||||
|
Cloaks.initialize();
|
||||||
|
Hats.initialize();
|
||||||
|
Providers.saturn.logInfo("Saturn Session initialization complete");
|
||||||
|
} else {
|
||||||
|
Providers.saturn.logError("Failed to authenticate with the server");
|
||||||
|
}
|
||||||
|
}).start();
|
||||||
|
}
|
||||||
|
|
||||||
public static boolean connectTimeout() {
|
public static boolean connectTimeout() {
|
||||||
try {
|
try {
|
||||||
session = Session.connect("wss://saturn-server.selimaj.dev", 10, TimeUnit.SECONDS);
|
session = Session.connect("wss://saturn-server.selimaj.dev", 2, TimeUnit.MINUTES);
|
||||||
return true;
|
return true;
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
|
|||||||
Reference in New Issue
Block a user