From 61baa5307620d5ccaee3613dfef9e01cc0d3360d Mon Sep 17 00:00:00 2001 From: Zlatin Balevsky Date: Sat, 30 Nov 2019 13:26:20 +0000 Subject: [PATCH] _logManager cannot be set on RouterContexts (i.e. when running as plugin) --- core/src/main/groovy/com/muwire/core/Core.groovy | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/core/src/main/groovy/com/muwire/core/Core.groovy b/core/src/main/groovy/com/muwire/core/Core.groovy index f82cdf9e..930eb0db 100644 --- a/core/src/main/groovy/com/muwire/core/Core.groovy +++ b/core/src/main/groovy/com/muwire/core/Core.groovy @@ -150,10 +150,12 @@ public class Core { } if (!props.embeddedRouter) { - log.info "Initializing I2P context" - I2PAppContext.getGlobalContext().logManager() - I2PAppContext.getGlobalContext()._logManager = new MuWireLogManager() - router = null + if (!(I2PAppContext.getGlobalContext() instanceof RouterContext)) { + log.info "Initializing I2P context" + I2PAppContext.getGlobalContext().logManager() + I2PAppContext.getGlobalContext()._logManager = new MuWireLogManager() + router = null + } } else { log.info("launching embedded router") Properties routerProps = new Properties()