From 9151df68168c7111252bce8d324c5306a275dcc7 Mon Sep 17 00:00:00 2001 From: Zlatin Balevsky Date: Sat, 30 Nov 2019 14:27:40 +0000 Subject: [PATCH] kill i2p session on shutdown --- core/src/main/groovy/com/muwire/core/Core.groovy | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/src/main/groovy/com/muwire/core/Core.groovy b/core/src/main/groovy/com/muwire/core/Core.groovy index 930eb0db..370be007 100644 --- a/core/src/main/groovy/com/muwire/core/Core.groovy +++ b/core/src/main/groovy/com/muwire/core/Core.groovy @@ -95,6 +95,7 @@ public class Core { final Properties i2pOptions final MuWireSettings muOptions + private final I2PSession i2pSession; private final TrustService trustService private final TrustSubscriber trustSubscriber private final PersisterService persisterService @@ -188,7 +189,6 @@ public class Core { // options like tunnel length and quantity - I2PSession i2pSession I2PSocketManager socketManager keyDat.withInputStream { socketManager = new I2PSocketManagerFactory().createManager(it, i2pOptions["i2cp.tcp.host"], i2pOptions["i2cp.tcp.port"].toInteger(), i2pOptions) @@ -403,6 +403,8 @@ public class Core { chatManager.shutdown() log.info("shutting down connection manager") connectionManager.shutdown() + log.info("killing i2p session") + i2pSession.destroySession() if (router != null) { log.info("shutting down embedded router") router.shutdown(0)