-
Bug
-
Resolution: Fixed
-
P2
-
6
-
b86
-
generic
-
windows_xp
It's possible that this bug is duplication of 6425815 (the same OS, the same diagnostic).
see test:
------------
import java.net.*;
import java.io.*;
import java.util.*;
public class test10 {
public static void main( String[] args ){
try {
InetAddress lh = InetAddress.getLocalHost();
System.out.println( String.format( "local host is '%s':", lh ) );
MulticastSocket ms = new MulticastSocket( new InetSocketAddress(lh, 0) );
System.out.println( ms.getLocalAddress() + ":" + ms.getLocalPort() + (ms.isClosed()?" closed":" isn't closed") );
ms.joinGroup( InetAddress.getByName("224.80.80.80") );
} catch( Exception x ){
x.printStackTrace( System.out );
}
}
}
------------
result:
------------
Z:\tests>z:/lnks/jdk6/bin/java.exe -cp . test10
local host is 'zv/129.159.125.21':
/129.159.125.21:3245 isn't closed
java.net.SocketException: Socket closed
at java.net.PlainDatagramSocketImpl.join(Native Method)
at java.net.PlainDatagramSocketImpl.join(PlainDatagramSocketImpl.java:172)
at java.net.MulticastSocket.joinGroup(MulticastSocket.java:276)
at test10.main(test10.java:13)
------------
see test:
------------
import java.net.*;
import java.io.*;
import java.util.*;
public class test10 {
public static void main( String[] args ){
try {
InetAddress lh = InetAddress.getLocalHost();
System.out.println( String.format( "local host is '%s':", lh ) );
MulticastSocket ms = new MulticastSocket( new InetSocketAddress(lh, 0) );
System.out.println( ms.getLocalAddress() + ":" + ms.getLocalPort() + (ms.isClosed()?" closed":" isn't closed") );
ms.joinGroup( InetAddress.getByName("224.80.80.80") );
} catch( Exception x ){
x.printStackTrace( System.out );
}
}
}
------------
result:
------------
Z:\tests>z:/lnks/jdk6/bin/java.exe -cp . test10
local host is 'zv/129.159.125.21':
/129.159.125.21:3245 isn't closed
java.net.SocketException: Socket closed
at java.net.PlainDatagramSocketImpl.join(Native Method)
at java.net.PlainDatagramSocketImpl.join(PlainDatagramSocketImpl.java:172)
at java.net.MulticastSocket.joinGroup(MulticastSocket.java:276)
at test10.main(test10.java:13)
------------