UPnP in Overlayweaver
if (Config.getBoolean("dhtUPnP", true)) { String internalAddress = InetAddress.getLocalHost().getHostAddress(); UPnPAddressPortMapper.start(internalAddress, dataPort, Mapping.Protocol.TCP, "Genkidama data port", null, 90 * 1000L); InetAddress extAddress; while((extAddress = UPnPAddressPortMapper.getExternalAddress()) == null); globalIP = extAddress.getHostAddress(); }else if((globalIP = Config.getString("dhtGlobalIP", null)) == null) { Logger.warning("Please set dhtGlobalIP"); throw new Exception("Unable to detect global IP"); }
UPnPからglobalIPを貰って来たくてとりあえず適当に書いたら、whileから抜けられなくなってるようだ。
このクラスに頼るのは得策じゃないかも?
ちなみにルータがUPnPをしゃべってるのはWindowsくんのインタフェースでは確認している。
もう少しデバッグを入れてみないとわからんなぁ。