You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by ti...@apache.org on 2020/06/12 22:30:50 UTC

[maven-surefire] branch macos-ipv4 updated: InetAddress by bytes

This is an automated email from the ASF dual-hosted git repository.

tibordigana pushed a commit to branch macos-ipv4
in repository https://gitbox.apache.org/repos/asf/maven-surefire.git


The following commit(s) were added to refs/heads/macos-ipv4 by this push:
     new 258b545  InetAddress by bytes
258b545 is described below

commit 258b54515747050be38c7505c917955afc9135ff
Author: tibordigana <ti...@apache.org>
AuthorDate: Sat Jun 13 00:30:39 2020 +0200

    InetAddress by bytes
---
 .../apache/maven/plugin/surefire/extensions/SurefireForkChannel.java   | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/extensions/SurefireForkChannel.java b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/extensions/SurefireForkChannel.java
index c2e26d3..cb89dd5 100644
--- a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/extensions/SurefireForkChannel.java
+++ b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/extensions/SurefireForkChannel.java
@@ -83,7 +83,8 @@ final class SurefireForkChannel extends ForkChannel
         super( arguments );
         server = open( withThreadPool( THREAD_POOL ) );
         setTrueOptions( SO_REUSEADDR, TCP_NODELAY, SO_KEEPALIVE );
-        server.bind( null, 1 );
+        server.bind( new InetSocketAddress( InetAddress.getByAddress( InetAddress.getLocalHost().getAddress() ),
+            0 ), 1 );
         InetSocketAddress localAddress = (InetSocketAddress) server.getLocalAddress();
         localHost = InetAddress.getLocalHost().getHostAddress(); // localAddress.getHostString();
         localPort = localAddress.getPort();