harmony-commits mailing list archives

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

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

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

I've not had a good look at the code but my initial impression is that the solution is *not*
reasonable.  We should know if we are connected or not because we will have called "connect".
 We shouldn't have to try it and see if it fails (with hopefully the failure we expect) and
then try again.  However, a regression test will be required regardless of how we solve the
problem.


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