harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ray Chen (JIRA)" <j...@apache.org>
Subject [jira] Updated: (HARMONY-6478) [classlib][luni]Got "The socket is already connected" SocketException on AIX
Date Thu, 18 Mar 2010 06:10:27 GMT

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

Ray Chen updated HARMONY-6478:
------------------------------

    Attachment: HY-6478.diff

The attached patch can fix this problem.
The logic seems a little confusing, so I added some comments in it.

Any suggestions are welcome.

Thank you! 

> [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.


Mime
View raw message