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 f7ad7505..1b0fac1c 100644 --- a/core/src/main/groovy/com/muwire/core/connection/ConnectionEstablisher.groovy +++ b/core/src/main/groovy/com/muwire/core/connection/ConnectionEstablisher.groovy @@ -57,7 +57,7 @@ class ConnectionEstablisher { return def toTry - while(true) { + for (int i = 0; i < 5; i++) { toTry = hostCache.getHosts(1) if (toTry.isEmpty()) return