diff --git a/src/main/java/org/elasticsearch/discovery/zen/ping/unicast/UnicastZenPing.java b/src/main/java/org/elasticsearch/discovery/zen/ping/unicast/UnicastZenPing.java index c6a65dd1da0..825f0a93429 100644 --- a/src/main/java/org/elasticsearch/discovery/zen/ping/unicast/UnicastZenPing.java +++ b/src/main/java/org/elasticsearch/discovery/zen/ping/unicast/UnicastZenPing.java @@ -270,7 +270,12 @@ public class UnicastZenPing extends AbstractLifecycleComponent implemen if (sendPingsHandler.isClosed()) { return; } - sendPingsHandler.nodeToDisconnect.add(nodeToSend); + // only disconnect from nodes that we will end up creating a light connection to, as they are temporal + // if we find on the disco nodes a matching node by address, we are going to restore the connection + // anyhow down the line if its not connected... + if (!nodeFoundByAddress) { + sendPingsHandler.nodeToDisconnect.add(nodeToSend); + } // fork the connection to another thread sendPingsHandler.executor().execute(new Runnable() { @Override