From 3116e20c7c579dca764d71d13d64ed55d659d377 Mon Sep 17 00:00:00 2001 From: Zlatin Balevsky Date: Thu, 7 May 2020 03:12:09 +0100 Subject: [PATCH] Fix i2np port change on every restart, github issue #45 --- core/src/main/groovy/com/muwire/core/Core.groovy | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/main/groovy/com/muwire/core/Core.groovy b/core/src/main/groovy/com/muwire/core/Core.groovy index a8a74fa7..bd588efd 100644 --- a/core/src/main/groovy/com/muwire/core/Core.groovy +++ b/core/src/main/groovy/com/muwire/core/Core.groovy @@ -169,8 +169,8 @@ public class Core { if (!i2pOptions.containsKey("outbound.nickname")) i2pOptions["outbound.nickname"] = tunnelName } - if (!(i2pOptions.hasProperty("i2np.ntcp.port") - && i2pOptions.hasProperty("i2np.udp.port") + if (!(i2pOptions.containsKey("i2np.ntcp.port") + && i2pOptions.containsKey("i2np.udp.port") )) { Random r = new Random() int port = r.nextInt(60000) + 4000