8255604: java/nio/channels/DatagramChannel/Connect.java fails with java.net.BindException: Cannot assign requested address: connect
Reviewed-by: dfuchs, michaelm
This commit is contained in:
parent
2a2fa134c3
commit
d5138d1fce
@ -133,7 +133,7 @@ public class Connect {
|
||||
final DatagramChannel dc;
|
||||
|
||||
Reactor() throws IOException {
|
||||
dc = DatagramChannel.open().bind(new InetSocketAddress(0));
|
||||
dc = DatagramChannel.open().bind(new InetSocketAddress(InetAddress.getLoopbackAddress(), 0));
|
||||
}
|
||||
|
||||
SocketAddress getSocketAddress() throws IOException {
|
||||
|
Loading…
x
Reference in New Issue
Block a user