From 0c410d6cf5c53440e05a05288f1d8c16400342ce Mon Sep 17 00:00:00 2001 From: genofire Date: Sun, 9 Feb 2020 11:38:17 +0100 Subject: [PATCH] [BUGFIX] happy eyeball: concurrents resolve connect --- src/main/java/eu/siacs/conversations/utils/Resolver.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/eu/siacs/conversations/utils/Resolver.java b/src/main/java/eu/siacs/conversations/utils/Resolver.java index 6b7d17ca6..3d7992b9b 100644 --- a/src/main/java/eu/siacs/conversations/utils/Resolver.java +++ b/src/main/java/eu/siacs/conversations/utils/Resolver.java @@ -277,7 +277,7 @@ public class Resolver { result = executor.invokeAny(r); executor.shutdown(); if (result == null) { - Log.i(Config.LOGTAG, Resolver.class.getSimpleName() + ": happy eyeball unable to connect to one address"); + Log.e(Config.LOGTAG, Resolver.class.getSimpleName() + ": happy eyeball unable to connect to one address - this code should not be reachable"); return null; } Thread disconnector = new Thread(() -> { @@ -299,7 +299,7 @@ public class Resolver { Log.e(Config.LOGTAG, Resolver.class.getSimpleName() + ": happy eyeball failed: ", e); return null; } catch (ExecutionException e) { - Log.e(Config.LOGTAG, Resolver.class.getSimpleName() + ": happy eyeball failed: ", e); + Log.i(Config.LOGTAG, Resolver.class.getSimpleName() + ": happy eyeball unable to connect to one address"); return null; } } @@ -437,6 +437,7 @@ public class Resolver { if (this.socket != null && this.socket.isConnected()) { return this ; } + throw new Exception("Resolver.Result was not possible to connect - should be catched by executor"); return null; }