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 e5edd97c..e4f72884 100644 --- a/core/src/main/groovy/com/muwire/core/connection/ConnectionEstablisher.groovy +++ b/core/src/main/groovy/com/muwire/core/connection/ConnectionEstablisher.groovy @@ -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) {