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] Created: (HARMONY-6478) [classlib][luni]Got "The socket is already connected" SocketException on AIX
Date Thu, 18 Mar 2010 06:08:27 GMT
[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

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();

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.

View raw message