From 4d984eb450d4e942148f3e14d0e6e9f5103d4e70 Mon Sep 17 00:00:00 2001 From: Daniel Lublin Date: Thu, 25 Jun 2020 09:42:06 +0200 Subject: Catch error when resolving --- src/main/java/se/lublin/humla/model/Server.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/java/se/lublin/humla/model/Server.java b/src/main/java/se/lublin/humla/model/Server.java index 1621803..dd4b30a 100644 --- a/src/main/java/se/lublin/humla/model/Server.java +++ b/src/main/java/se/lublin/humla/model/Server.java @@ -215,8 +215,10 @@ public class Server implements Parcelable { // TODO SRV just picking the first record. return; } - } catch (IOException e) { - Log.d(Constants.TAG, "resolveSRV() run() " + e); + } catch (IOException | IllegalArgumentException e) { + // java.net.IDN.toASCII down in resolveSrv() happens to throw IAE + // https://github.com/MiniDNS/minidns/issues/104 + Log.d(Constants.TAG, "Server, exception in srvResolve: " + e); } } }); -- cgit v1.2.3