diff --git a/core/src/main/groovy/com/muwire/core/connection/ConnectionEstablisher.groovy b/core/src/main/groovy/com/muwire/core/connection/ConnectionEstablisher.groovy index b9c71322..647fb8cc 100644 --- a/core/src/main/groovy/com/muwire/core/connection/ConnectionEstablisher.groovy +++ b/core/src/main/groovy/com/muwire/core/connection/ConnectionEstablisher.groovy @@ -80,7 +80,7 @@ class ConnectionEstablisher { def toTry = hostCache.getHosts(1, {!connectionManager.isConnected(it) && !inProgress.contains(it)} as Predicate) if (toTry.isEmpty()) return - toTry == toTry[0] + toTry = toTry[0] if (!connectionManager.isConnected(toTry) && inProgress.add(toTry)) executor.execute({connect(toTry)} as Runnable) }