Submitted On 11-MAR-2001
twelve
Here's the discussion thread about this issue on Winsock-2
mailing list (including an official confirmation of this
Win2K behaviour from the program manager of win networking
at MSFT) :
http://www.stardust.com/cgi-bin/wa?
A2=ind9905&L=winsoc&F=&S=&P=15160
The only workaround I could see for this nasty problem is
to catch the IOException and immediately close the current
socket and create a new one on the same port - ugly fix but
seem to work well enough...
The cleaner 90% java fix would be to plug in some native
code that uses the appropriate IOCTL call to turn off this
behaviour on Win2K SP2. See this MS KB article for info on
this :
http://support.microsoft.com/support/kb/articles/Q263/8/23.A
SP
Hope that helps until Merlin comes out!
Submitted On 22-MAY-2001
jyhuang
When a SecurityManager is present, the same call should
result in
java.net.SocketException: Connection reset by peer: Datagram
peek failed.
Submitted On 07-AUG-2001
john_felten
I have the exact same problem running on linux Red Hat 6.1
Submitted On 17-JAN-2002
Sarnoth
I think there is more to this problem than stated here. I
ran in to this and after tracing it to receiving a
WSACONNRESET I researched why I might be receiving that. It
turns out that a proper UDP implementation is supposed to
notify the sender when a receiver it though existed no
longer exists as determined by the "port unreachable" ICMP
message. This notification is made by raising such an error
on the next receive. It was considered a bug in previous
version of windows that it did not do this. That java
treats this as a "socket closed" SocketException is wrong,
but it should also not ignore it. There may be programs
that rely on a SocketException for notification of a
receiver that went away. A good solution might be to throw
a subclass of SocketException that indicates what really
happened.
PLEASE NOTE: JDK6 is formerly known as Project Mustang
|