You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Mark Hindess (JIRA)" <ji...@apache.org> on 2010/03/18 08:48:27 UTC

[jira] Commented: (HARMONY-6478) [classlib][luni]Got "The socket is already connected" SocketException on AIX

    [ https://issues.apache.org/jira/browse/HARMONY-6478?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12846786#action_12846786 ] 

Mark Hindess commented on HARMONY-6478:
---------------------------------------

Is there already a test case that covers this or do you need to add a regression test?


> [classlib][luni]Got "The socket is already connected" SocketException on AIX
> ----------------------------------------------------------------------------
>
>                 Key: HARMONY-6478
>                 URL: https://issues.apache.org/jira/browse/HARMONY-6478
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>         Environment: AIX
>            Reporter: Ray Chen
>         Attachments: HY-6478.diff
>
>
> When ran the following test case, got SocketException says "The socket is already connected"
> public static void main(String[] args) throws IOException {
>         ServerSocket ss = new ServerSocket(0);
> 	int port = ss.getLocalPort();
> 	byte[] bb = {(byte)1};
>         InetAddress address = InetAddress.getLocalHost();
> 	Socket s = new Socket(address,port,false);
> 	OutputStream os = s.getOutputStream();
> 	os.write(bb);
> }
> The exception trace as following: 
> Exception in thread "main" java.net.SocketException: The socket is already connected
>         at org.apache.harmony.luni.platform.OSNetworkSystem.sendDatagram2(Native Method)
>         at org.apache.harmony.luni.net.PlainSocketImpl.write(PlainSocketImpl.java:571)
>         at org.apache.harmony.luni.net.SocketOutputStream.write(SocketOutputStream.java:50)
>         at CMVC163335.main(CMVC163335.java:32)

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