Fix a NPE in a testcase when running via ubuntu
This commit is contained in:
parent
16bbd31330
commit
1314db9c0a
@ -28,7 +28,6 @@ import io.netty.channel.socket.DatagramChannelFactory;
|
||||
import io.netty.testsuite.util.TestUtils;
|
||||
import io.netty.util.internal.ExecutorUtil;
|
||||
|
||||
import java.net.InetAddress;
|
||||
import java.net.InetSocketAddress;
|
||||
import java.net.NetworkInterface;
|
||||
import java.util.concurrent.CountDownLatch;
|
||||
@ -73,7 +72,7 @@ public abstract class AbstractDatagramMulticastTest {
|
||||
|
||||
int port = TestUtils.getFreePort();
|
||||
|
||||
NetworkInterface iface = NetworkInterface.getByInetAddress(InetAddress.getLocalHost());
|
||||
NetworkInterface iface = NetworkInterface.getNetworkInterfaces().nextElement();
|
||||
sb.setOption("networkInterface", iface);
|
||||
sb.setOption("reuseAddress", true);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user