wait for client manager to load before connecting

This commit is contained in:
Zlatin Balevsky
2019-11-30 17:32:02 +00:00
parent d0b62af32e
commit ad8983e889

View File

@@ -21,6 +21,16 @@ public class MuWireServlet extends HttpServlet {
super.init(config);
RouterContext ctx = (RouterContext) I2PAppContext.getGlobalContext();
while(!ctx.clientManager().isAlive()) {
try {
Thread.sleep(100);
} catch (InterruptedException e) {
throw new ServletException(e);
}
}
String home = ctx.getConfigDir()+File.separator+"plugins"+File.separator+"MuWire";
String version = config.getInitParameter("version");