harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shi Jun Zhang (JIRA)" <j...@apache.org>
Subject [jira] Updated: (HARMONY-6595) [classlib][nio]java.nio.channels.SocketChannel.write() throws SocketException in non-blocking mode
Date Wed, 21 Jul 2010 09:18:52 GMT

     [ https://issues.apache.org/jira/browse/HARMONY-6595?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel

Shi Jun Zhang updated HARMONY-6595:

    Attachment: HARMONY-6595.diff

In non-blocking mode, the native system method writev() will return EAGAIN/EWOULDBLOCK error
code on Linux/Unix and WSASend() will return WSATRY_AGAIN/WSAEWOULDBLOCK error code on Windows.
These error code means try again but not fatal error, so we should not throw exception. I
add some code to check whether the error code is one of the above codes, if yes, just return
0 as bytes length written but not throw the exception.
A simple test case which can reproduce this issue is also added.

> [classlib][nio]java.nio.channels.SocketChannel.write() throws SocketException in non-blocking
> --------------------------------------------------------------------------------------------------
>                 Key: HARMONY-6595
>                 URL: https://issues.apache.org/jira/browse/HARMONY-6595
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>    Affects Versions: 5.0M14
>         Environment: Windows or some version of Linux (BSD 4.3 or earlier version)
>            Reporter: Shi Jun Zhang
>             Fix For: 5.0M15
>         Attachments: HARMONY-6595.diff
> In non-blocking mode, invoke java.nio.channels.SocketChannel.write(ByteBuffer[] sources)
 several times for the same channel, it will throw SocketException while RI will not throw
this exception.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message