only connect to hosts not already in progress

This commit is contained in:
Zlatin Balevsky
2018-07-26 12:44:53 +01:00
parent e62bceda29
commit 063357120c

View File

@@ -78,8 +78,8 @@ class ConnectionEstablisher {
}
if (toTry == null)
return
inProgress.add(toTry)
executor.execute({connect(toTry)} as Runnable)
if (inProgress.add(toTry))
executor.execute({connect(toTry)} as Runnable)
}
private void connect(Destination toTry) {