diff --git a/core/src/main/java/org/elasticsearch/common/transport/InetSocketTransportAddress.java b/core/src/main/java/org/elasticsearch/common/transport/InetSocketTransportAddress.java index 936ef1ab544..80c7b857224 100644 --- a/core/src/main/java/org/elasticsearch/common/transport/InetSocketTransportAddress.java +++ b/core/src/main/java/org/elasticsearch/common/transport/InetSocketTransportAddress.java @@ -33,7 +33,7 @@ import java.net.InetSocketAddress; */ public final class InetSocketTransportAddress implements TransportAddress { - public static final InetSocketTransportAddress PROTO = new InetSocketTransportAddress(new InetSocketAddress("127.0.0.1", 0)); + public static final InetSocketTransportAddress PROTO = new InetSocketTransportAddress(); private final InetSocketAddress address; @@ -51,6 +51,10 @@ public final class InetSocketTransportAddress implements TransportAddress { this.address = new InetSocketAddress(inetAddress, port); } + private InetSocketTransportAddress() { + address = null; + } + public InetSocketTransportAddress(InetAddress address, int port) { this(new InetSocketAddress(address, port)); }