You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Paulex Yang (JIRA)" <ji...@apache.org> on 2006/08/02 11:41:15 UTC

[jira] Resolved: (HARMONY-718) [classlib][luni] Socket fails to connect to wildcard address.

     [ http://issues.apache.org/jira/browse/HARMONY-718?page=all ]

Paulex Yang resolved HARMONY-718.
---------------------------------

    Resolution: Duplicate
      Assignee: Paulex Yang

Alexander, seems this issue is duplicated with HARMONY-946, would you please verify if this is fully resovled as you expected now?

> [classlib][luni] Socket fails to connect to wildcard address.
> -------------------------------------------------------------
>
>                 Key: HARMONY-718
>                 URL: http://issues.apache.org/jira/browse/HARMONY-718
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Alexander Kleymenov
>         Assigned To: Paulex Yang
>            Priority: Minor
>
> Harmony socket implementation can not establish connection in the case of wildcard address. To reproduce the problem run the following test:
>  
> ----------------------
> import java.net.*;
>  
> public class SocketBug {
>     
>     public static void main(String[] args) throws Exception {
>         ServerSocket ss = new ServerSocket(0);
>         Socket s = new Socket();
>         s.connect(new InetSocketAddress(ss.getLocalPort()));
>         ss.accept();
>         s.close();
>         ss.close();
>     }
> }
> ----------------------
>  
> It fails with the following exception:
>  
> Exception in thread "main" java.net.ConnectException: 0.0.0.0/0.0.0.0:3909 - The address is not available
>         at org.apache.harmony.luni.net.PlainSocketImpl.connect(PlainSocketImpl.java:238)
>         at org.apache.harmony.luni.net.PlainSocketImpl.connect(PlainSocketImpl.java:587)
>         at java.net.Socket.connect(Socket.java:977)
>         at java.net.Socket.connect(Socket.java:920)
>         at SocketBug.main(SocketBug.java:8)
>  
> while on RI test silently exits.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira