Trying to fix ge

This commit is contained in:
ceikry 2021-07-21 21:48:34 -05:00
parent b86777e190
commit ab93cc7865
2 changed files with 11 additions and 3 deletions

View file

@ -78,10 +78,13 @@ public final class SystemTermination {
e.printStackTrace();
}
}
while(!Repository.getDisconnectionQueue().isEmpty()){
Repository.getDisconnectionQueue().update();
try {
Thread.sleep(100);
} catch (Exception ignored) {}
}
Repository.getDisconnectionQueue().update();
try {
Thread.sleep(3_000);
} catch (Exception ignored){}
GrandExchangeDatabase.save();
OfferManager.save();
SystemLogger.flushLogs();

View file

@ -37,6 +37,11 @@ class DisconnectionQueue {
}
}
fun isEmpty(): Boolean{
return queue.isEmpty()
}
/**
* Finishes a disconnection.
* @param entry The entry.