United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6935563 (dc) Improve connection reset/port unreachable handling [win]
JDK-6935563 : (dc) Improve connection reset/port unreachable handling [win]

Details
Type:
Bug
Submit Date:
2010-03-17
Status:
Closed
Updated Date:
2011-04-11
Project Name:
JDK
Resolved Date:
2011-03-08
Component:
core-libs
OS:
windows_vista,windows_7
Sub-Component:
java.nio
CPU:
x86
Priority:
P3
Resolution:
Fixed
Affected Versions:
1.4.2_22,5.0u21,6u14
Fixed Versions:

Related Reports
Backport:
Backport:
Backport:
Backport:
Backport:
Backport:
Backport:
Relates:

Sub Tasks

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.
                                     
2010-03-18



Hardware and Software, Engineered to Work Together