diff --git a/core/pom.xml b/core/pom.xml
index 2784fc501..e1b40ef98 100644
--- a/core/pom.xml
+++ b/core/pom.xml
@@ -11,7 +11,7 @@
dk.alexandra.fresco
master-pom
- 1.3.4-SNAPSHOT
+ 1.3.5
diff --git a/core/src/main/java/dk/alexandra/fresco/framework/network/socket/Connector.java b/core/src/main/java/dk/alexandra/fresco/framework/network/socket/Connector.java
index 31a723d9f..c0fafda10 100644
--- a/core/src/main/java/dk/alexandra/fresco/framework/network/socket/Connector.java
+++ b/core/src/main/java/dk/alexandra/fresco/framework/network/socket/Connector.java
@@ -2,26 +2,20 @@
import dk.alexandra.fresco.framework.Party;
import dk.alexandra.fresco.framework.configuration.NetworkConfiguration;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javax.net.ServerSocketFactory;
+import javax.net.SocketFactory;
+import javax.net.ssl.SSLHandshakeException;
import java.io.IOException;
import java.net.ConnectException;
import java.net.ServerSocket;
import java.net.Socket;
import java.time.Duration;
-import java.time.Instant;
import java.util.HashMap;
import java.util.Map;
-import java.util.concurrent.CompletionService;
-import java.util.concurrent.ExecutionException;
-import java.util.concurrent.ExecutorCompletionService;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
-import java.util.concurrent.Future;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.TimeoutException;
-import javax.net.ServerSocketFactory;
-import javax.net.SocketFactory;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
+import java.util.concurrent.*;
public class Connector implements NetworkConnector {
@@ -73,35 +67,45 @@ public Map getSocketMap() {
*/
private Map connectNetwork(final NetworkConfiguration conf,
final Duration timeout) {
+
Map socketMap = new HashMap<>(conf.noOfParties());
+
// We use two threads. One for the client connections and one for the server connections.
final int connectionThreads = 2;
ExecutorService connectionExecutor = Executors.newFixedThreadPool(connectionThreads);
+
// If either the client or the server thread fails we would like cancel the other as soon as
// possible. For this purpose we use a CompletionService.
- CompletionService