From 36b0618b8d652fe8af4a91c964df83dedf561b80 Mon Sep 17 00:00:00 2001 From: idk Date: Fri, 11 Feb 2022 13:10:50 -0500 Subject: [PATCH] Loop on the CAM until the CAM is non-null to prevent a situation where the null CAM is used to call getRegisteredApp, apparenly due to a race condition somewhere --- java/net/i2p/router/WinLauncher.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/java/net/i2p/router/WinLauncher.java b/java/net/i2p/router/WinLauncher.java index afb2bab..8bc3f44 100644 --- a/java/net/i2p/router/WinLauncher.java +++ b/java/net/i2p/router/WinLauncher.java @@ -73,7 +73,12 @@ public class WinLauncher { } // then wait for the update manager - ClientAppManager cam = ctx.clientAppManager(); + + ClientAppManager cam; + while ((cam = ctx.clientAppManager()) == null) { + sleep(1000); + } + UpdateManager um; while ((um = (UpdateManager) cam.getRegisteredApp(UpdateManager.APP_NAME)) == null) { sleep(1000);