Skip to content

Commit

Permalink
Use a loopback address instead of 0.0.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
gnodet committed Oct 21, 2020
1 parent 63fd7f3 commit 00aed21
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Expand Up @@ -362,7 +362,7 @@ public boolean maybeStaleAddress(Exception failure) {
}

public DaemonConnection<Message> connect(int port) throws DaemonException.ConnectException {
InetSocketAddress address = new InetSocketAddress(port);
InetSocketAddress address = new InetSocketAddress(Inet4Address.getLoopbackAddress(), port);
try {
LOGGER.debug("Trying to connect to address {}.", address);
SocketChannel socketChannel = SocketChannel.open();
Expand Down
Expand Up @@ -93,7 +93,7 @@ public Server(String uid) throws IOException {
cli = new DaemonMavenCli();

registry = new DaemonRegistry(layout.registry());
socket = ServerSocketChannel.open().bind(new InetSocketAddress(0));
socket = ServerSocketChannel.open().bind(new InetSocketAddress(Inet4Address.getLoopbackAddress(), 0));

final int idleTimeout = Environment.DAEMON_IDLE_TIMEOUT
.systemProperty()
Expand Down

0 comments on commit 00aed21

Please sign in to comment.