From 0498ea69ea63fbc500347bb89236a049c981ba54 Mon Sep 17 00:00:00 2001 From: zzz Date: Mon, 10 Jan 2022 13:31:35 -0500 Subject: [PATCH] IPv6 address fix --- src/net/i2p/itoopie/i2pcontrol/JSONRPC2Interface.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/net/i2p/itoopie/i2pcontrol/JSONRPC2Interface.java b/src/net/i2p/itoopie/i2pcontrol/JSONRPC2Interface.java index 4571b9377..cc1a78392 100644 --- a/src/net/i2p/itoopie/i2pcontrol/JSONRPC2Interface.java +++ b/src/net/i2p/itoopie/i2pcontrol/JSONRPC2Interface.java @@ -45,6 +45,8 @@ public class JSONRPC2Interface { public static void setupSession() { URL srvURL = null; String srvHost = _conf.getConf("server.hostname", "localhost"); + if (srvHost.contains(":")) + srvHost = '[' + srvHost + ']'; int srvPort = _conf.getConf("server.port", 7650); String srvTarget = _conf.getConf("server.target", "jsonrpc"); String method;