prevent infinite loop if we don't know of any unconnected hosts

pull/4/head
Zlatin Balevsky 2018-07-25 19:26:08 +01:00
parent fd4ee74079
commit 53fde470ee
1 changed files with 1 additions and 1 deletions

View File

@ -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