JDK-6935563 : (dc) Improve connection reset/port unreachable handling [win]
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.nio
  • Affected Version: 1.4.2_22,5.0u21,6u14
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: windows_vista,windows_7
  • CPU: x86
  • Submitted: 2010-03-17
  • Updated: 2011-04-11
  • Resolved: 2011-03-08
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other JDK 6 JDK 7
5.0u29Fixed 6u22-revFixed 7 b100Fixed
Related Reports
Relates :  
Description
There is diffrent behavior in nio  between windows and Solaris/linux.

In windows, java.nio.channels.Selecor#select does not block under the follwoing condition.

- Valid IP address
- Send a packet to the destination of which the port is closed 
(Please see the attached DatagramTest.java)

In platforms other than Windows, java.nio.channels.Selecor#select seems to block.

CONFIGURATION:
JDK : 1.4.2_XX/5ux/6ux/7b85
OS : WindowsXP/Vista/7

REPRODUCE:
1. Compile the attached program, "DatagramTest.java"
2. Invoke "java DatagramTest"

FREQUENCY :
this problem always occurs

EXPECTED : 

Only "step1" message appears.


ACTUAL : 

step1
valid:true
readable:true
writable:false

Comments
EVALUATION On Windows we need to toggle SIO_UDP_CONNRESET when a DatagramChannel is connected or disconnected.
18-03-2010