Skip to content

Commit

Permalink
Fixed crash when UI took too long to initialize
Browse files Browse the repository at this point in the history
  • Loading branch information
Lenni0451 committed Jan 8, 2023
1 parent bf46dba commit 1b5edd4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ org.gradle.configureondemand=true
# Project properties
maven_name=ViaProxy
maven_group=net.raphimc
maven_version=3.0.2
maven_version=3.0.3
4 changes: 4 additions & 0 deletions src/main/java/net/raphimc/viaproxy/ViaProxy.java
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,10 @@ public static void injectedMain(String[] args) throws InterruptedException {
updateCheckThread.start();
loaderThread.join();
accountRefreshThread.join();
while (ui[0] == null) {
Logger.LOGGER.info("Waiting for UI to be initialized...");
Thread.sleep(1000);
}
ui[0].setReady();
Logger.LOGGER.info("ViaProxy started successfully!");
return;
Expand Down

0 comments on commit 1b5edd4

Please sign in to comment.