You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Stephane Godin (JIRA)" <ji...@apache.org> on 2010/01/12 04:46:54 UTC

[jira] Created: (NET-307) One of the "connect" method in class org.apache.commons.net.SocketClient doesn't handle connection timeout properly

One of the "connect" method in class org.apache.commons.net.SocketClient doesn't handle connection timeout properly
-------------------------------------------------------------------------------------------------------------------

                 Key: NET-307
                 URL: https://issues.apache.org/jira/browse/NET-307
             Project: Commons Net
          Issue Type: Improvement
    Affects Versions: 2.0
         Environment: Not applicable
            Reporter: Stephane Godin


org.apache.commons.net.SocketClient method connect (line 225) doesn't use the configured timeout value.

Original code:

{code:title=SocketClient.java (line 225)|borderStyle=solid}
    public void connect(String hostname, int port,
                        InetAddress localAddr, int localPort)
    throws SocketException, IOException
    {
        _socket_ = _socketFactory_.createSocket(hostname, port, localAddr, localPort);
        _connectAction_();
    }
{code}

Working code:

{code:title=SocketClient.java (line 225)|borderStyle=solid}
    public void connect(String hostname, int port,
                        InetAddress localAddr, int localPort)
    throws SocketException, IOException
    {
        _socket_ = _socketFactory_.createSocket();
        _socket_.connect(new InetSocketAddress(hostname, port), connectTimeout);
        _connectAction_();
    }
{code}



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


[jira] Updated: (NET-307) One of the "connect" method in class org.apache.commons.net.SocketClient doesn't handle connection timeout properly

Posted by "sg (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/NET-307?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

sg updated NET-307:
-------------------

    Fix Version/s: 2.0

> One of the "connect" method in class org.apache.commons.net.SocketClient doesn't handle connection timeout properly
> -------------------------------------------------------------------------------------------------------------------
>
>                 Key: NET-307
>                 URL: https://issues.apache.org/jira/browse/NET-307
>             Project: Commons Net
>          Issue Type: Improvement
>    Affects Versions: 2.0
>         Environment: Not applicable
>            Reporter: sg
>            Priority: Minor
>
> org.apache.commons.net.SocketClient method connect (line 225) doesn't use the configured timeout value.
> Original code:
> {code:title=SocketClient.java (line 225)|borderStyle=solid}
>     public void connect(String hostname, int port,
>                         InetAddress localAddr, int localPort)
>     throws SocketException, IOException
>     {
>         _socket_ = _socketFactory_.createSocket(hostname, port, localAddr, localPort);
>         _connectAction_();
>     }
> {code}

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


[jira] Updated: (NET-307) One of the "connect" method in class org.apache.commons.net.SocketClient doesn't handle connection timeout properly

Posted by "sg (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/NET-307?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

sg updated NET-307:
-------------------

    Description: 
org.apache.commons.net.SocketClient method connect (line 225) doesn't use the configured timeout value.

Original code:

{code:title=SocketClient.java (line 225)|borderStyle=solid}
    public void connect(String hostname, int port,
                        InetAddress localAddr, int localPort)
    throws SocketException, IOException
    {
        _socket_ = _socketFactory_.createSocket(hostname, port, localAddr, localPort);
        _connectAction_();
    }
{code}

Proposed working alternative:

{code:title=SocketClient.java (line 225)|borderStyle=solid}
    public void connect(String hostname, int port,
                        InetAddress localAddr, int localPort)
    throws SocketException, IOException
    {
        _socket_ = _socketFactory_.createSocket();
        _socket_.bind(new InetSocketAddress(localAddr, localPort));
        _socket_.connect(new InetSocketAddress(hostname, port), connectTimeout);
        _connectAction_();
    }
{code}

  was:
org.apache.commons.net.SocketClient method connect (line 225) doesn't use the configured timeout value.

Original code:

{code:title=SocketClient.java (line 225)|borderStyle=solid}
    public void connect(String hostname, int port,
                        InetAddress localAddr, int localPort)
    throws SocketException, IOException
    {
        _socket_ = _socketFactory_.createSocket(hostname, port, localAddr, localPort);
        _connectAction_();
    }
{code}



> One of the "connect" method in class org.apache.commons.net.SocketClient doesn't handle connection timeout properly
> -------------------------------------------------------------------------------------------------------------------
>
>                 Key: NET-307
>                 URL: https://issues.apache.org/jira/browse/NET-307
>             Project: Commons Net
>          Issue Type: Improvement
>    Affects Versions: 2.0
>         Environment: Not applicable
>            Reporter: sg
>            Priority: Minor
>
> org.apache.commons.net.SocketClient method connect (line 225) doesn't use the configured timeout value.
> Original code:
> {code:title=SocketClient.java (line 225)|borderStyle=solid}
>     public void connect(String hostname, int port,
>                         InetAddress localAddr, int localPort)
>     throws SocketException, IOException
>     {
>         _socket_ = _socketFactory_.createSocket(hostname, port, localAddr, localPort);
>         _connectAction_();
>     }
> {code}
> Proposed working alternative:
> {code:title=SocketClient.java (line 225)|borderStyle=solid}
>     public void connect(String hostname, int port,
>                         InetAddress localAddr, int localPort)
>     throws SocketException, IOException
>     {
>         _socket_ = _socketFactory_.createSocket();
>         _socket_.bind(new InetSocketAddress(localAddr, localPort));
>         _socket_.connect(new InetSocketAddress(hostname, port), connectTimeout);
>         _connectAction_();
>     }
> {code}

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


[jira] Closed: (NET-307) One of the "connect" method in class org.apache.commons.net.SocketClient doesn't handle connection timeout properly

Posted by "Rory Winston (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/NET-307?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rory Winston closed NET-307.
----------------------------

       Resolution: Fixed
    Fix Version/s: 2.1

Thanks. This seems to have been fixed in the 2.1 branch a while ago.

> One of the "connect" method in class org.apache.commons.net.SocketClient doesn't handle connection timeout properly
> -------------------------------------------------------------------------------------------------------------------
>
>                 Key: NET-307
>                 URL: https://issues.apache.org/jira/browse/NET-307
>             Project: Commons Net
>          Issue Type: Improvement
>    Affects Versions: 2.0
>         Environment: Not applicable
>            Reporter: sg
>            Priority: Minor
>             Fix For: 2.1
>
>
> org.apache.commons.net.SocketClient method connect (line 225) doesn't use the configured timeout value.
> Original code:
> {code:title=SocketClient.java (line 225)|borderStyle=solid}
>     public void connect(String hostname, int port,
>                         InetAddress localAddr, int localPort)
>     throws SocketException, IOException
>     {
>         _socket_ = _socketFactory_.createSocket(hostname, port, localAddr, localPort);
>         _connectAction_();
>     }
> {code}
> Working alternative:
> {code:title=SocketClient.java (line 225)|borderStyle=solid}
>     public void connect(String hostname, int port,
>                         InetAddress localAddr, int localPort)
>     throws SocketException, IOException
>     {
>         _socket_ = _socketFactory_.createSocket();
>         _socket_.bind(new InetSocketAddress(localAddr, localPort));
>         _socket_.connect(new InetSocketAddress(hostname, port), connectTimeout);
>         _connectAction_();
>     }
> {code}

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


[jira] Updated: (NET-307) One of the "connect" method in class org.apache.commons.net.SocketClient doesn't handle connection timeout properly

Posted by "Stephane Godin (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/NET-307?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Stephane Godin updated NET-307:
-------------------------------

       Priority: Minor  (was: Major)
    Description: 
org.apache.commons.net.SocketClient method connect (line 225) doesn't use the configured timeout value.

Original code:

{code:title=SocketClient.java (line 225)|borderStyle=solid}
    public void connect(String hostname, int port,
                        InetAddress localAddr, int localPort)
    throws SocketException, IOException
    {
        _socket_ = _socketFactory_.createSocket(hostname, port, localAddr, localPort);
        _connectAction_();
    }
{code}


  was:
org.apache.commons.net.SocketClient method connect (line 225) doesn't use the configured timeout value.

Original code:

{code:title=SocketClient.java (line 225)|borderStyle=solid}
    public void connect(String hostname, int port,
                        InetAddress localAddr, int localPort)
    throws SocketException, IOException
    {
        _socket_ = _socketFactory_.createSocket(hostname, port, localAddr, localPort);
        _connectAction_();
    }
{code}

Working code:

{code:title=SocketClient.java (line 225)|borderStyle=solid}
    public void connect(String hostname, int port,
                        InetAddress localAddr, int localPort)
    throws SocketException, IOException
    {
        _socket_ = _socketFactory_.createSocket();
        _socket_.connect(new InetSocketAddress(hostname, port), connectTimeout);
        _connectAction_();
    }
{code}




> One of the "connect" method in class org.apache.commons.net.SocketClient doesn't handle connection timeout properly
> -------------------------------------------------------------------------------------------------------------------
>
>                 Key: NET-307
>                 URL: https://issues.apache.org/jira/browse/NET-307
>             Project: Commons Net
>          Issue Type: Improvement
>    Affects Versions: 2.0
>         Environment: Not applicable
>            Reporter: Stephane Godin
>            Priority: Minor
>
> org.apache.commons.net.SocketClient method connect (line 225) doesn't use the configured timeout value.
> Original code:
> {code:title=SocketClient.java (line 225)|borderStyle=solid}
>     public void connect(String hostname, int port,
>                         InetAddress localAddr, int localPort)
>     throws SocketException, IOException
>     {
>         _socket_ = _socketFactory_.createSocket(hostname, port, localAddr, localPort);
>         _connectAction_();
>     }
> {code}

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


[jira] Updated: (NET-307) One of the "connect" method in class org.apache.commons.net.SocketClient doesn't handle connection timeout properly

Posted by "sg (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/NET-307?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

sg updated NET-307:
-------------------

    Fix Version/s:     (was: 2.0)

> One of the "connect" method in class org.apache.commons.net.SocketClient doesn't handle connection timeout properly
> -------------------------------------------------------------------------------------------------------------------
>
>                 Key: NET-307
>                 URL: https://issues.apache.org/jira/browse/NET-307
>             Project: Commons Net
>          Issue Type: Improvement
>    Affects Versions: 2.0
>         Environment: Not applicable
>            Reporter: sg
>            Priority: Minor
>
> org.apache.commons.net.SocketClient method connect (line 225) doesn't use the configured timeout value.
> Original code:
> {code:title=SocketClient.java (line 225)|borderStyle=solid}
>     public void connect(String hostname, int port,
>                         InetAddress localAddr, int localPort)
>     throws SocketException, IOException
>     {
>         _socket_ = _socketFactory_.createSocket(hostname, port, localAddr, localPort);
>         _connectAction_();
>     }
> {code}

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


[jira] Updated: (NET-307) One of the "connect" method in class org.apache.commons.net.SocketClient doesn't handle connection timeout properly

Posted by "sg (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/NET-307?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

sg updated NET-307:
-------------------

    Description: 
org.apache.commons.net.SocketClient method connect (line 225) doesn't use the configured timeout value.

Original code:

{code:title=SocketClient.java (line 225)|borderStyle=solid}
    public void connect(String hostname, int port,
                        InetAddress localAddr, int localPort)
    throws SocketException, IOException
    {
        _socket_ = _socketFactory_.createSocket(hostname, port, localAddr, localPort);
        _connectAction_();
    }
{code}

Working alternative:

{code:title=SocketClient.java (line 225)|borderStyle=solid}
    public void connect(String hostname, int port,
                        InetAddress localAddr, int localPort)
    throws SocketException, IOException
    {
        _socket_ = _socketFactory_.createSocket();
        _socket_.bind(new InetSocketAddress(localAddr, localPort));
        _socket_.connect(new InetSocketAddress(hostname, port), connectTimeout);
        _connectAction_();
    }
{code}

  was:
org.apache.commons.net.SocketClient method connect (line 225) doesn't use the configured timeout value.

Original code:

{code:title=SocketClient.java (line 225)|borderStyle=solid}
    public void connect(String hostname, int port,
                        InetAddress localAddr, int localPort)
    throws SocketException, IOException
    {
        _socket_ = _socketFactory_.createSocket(hostname, port, localAddr, localPort);
        _connectAction_();
    }
{code}

Proposed working alternative:

{code:title=SocketClient.java (line 225)|borderStyle=solid}
    public void connect(String hostname, int port,
                        InetAddress localAddr, int localPort)
    throws SocketException, IOException
    {
        _socket_ = _socketFactory_.createSocket();
        _socket_.bind(new InetSocketAddress(localAddr, localPort));
        _socket_.connect(new InetSocketAddress(hostname, port), connectTimeout);
        _connectAction_();
    }
{code}


> One of the "connect" method in class org.apache.commons.net.SocketClient doesn't handle connection timeout properly
> -------------------------------------------------------------------------------------------------------------------
>
>                 Key: NET-307
>                 URL: https://issues.apache.org/jira/browse/NET-307
>             Project: Commons Net
>          Issue Type: Improvement
>    Affects Versions: 2.0
>         Environment: Not applicable
>            Reporter: sg
>            Priority: Minor
>
> org.apache.commons.net.SocketClient method connect (line 225) doesn't use the configured timeout value.
> Original code:
> {code:title=SocketClient.java (line 225)|borderStyle=solid}
>     public void connect(String hostname, int port,
>                         InetAddress localAddr, int localPort)
>     throws SocketException, IOException
>     {
>         _socket_ = _socketFactory_.createSocket(hostname, port, localAddr, localPort);
>         _connectAction_();
>     }
> {code}
> Working alternative:
> {code:title=SocketClient.java (line 225)|borderStyle=solid}
>     public void connect(String hostname, int port,
>                         InetAddress localAddr, int localPort)
>     throws SocketException, IOException
>     {
>         _socket_ = _socketFactory_.createSocket();
>         _socket_.bind(new InetSocketAddress(localAddr, localPort));
>         _socket_.connect(new InetSocketAddress(hostname, port), connectTimeout);
>         _connectAction_();
>     }
> {code}

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


[jira] Updated: (NET-307) One of the "connect" method in class org.apache.commons.net.SocketClient doesn't handle connection timeout properly

Posted by "Sebb (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/NET-307?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sebb updated NET-307:
---------------------

    Fix Version/s:     (was: 3.0)
                   2.0

> One of the "connect" method in class org.apache.commons.net.SocketClient doesn't handle connection timeout properly
> -------------------------------------------------------------------------------------------------------------------
>
>                 Key: NET-307
>                 URL: https://issues.apache.org/jira/browse/NET-307
>             Project: Commons Net
>          Issue Type: Improvement
>    Affects Versions: 2.0
>         Environment: Not applicable
>            Reporter: sg
>            Priority: Minor
>             Fix For: 2.0
>
>
> org.apache.commons.net.SocketClient method connect (line 225) doesn't use the configured timeout value.
> Original code:
> {code:title=SocketClient.java (line 225)|borderStyle=solid}
>     public void connect(String hostname, int port,
>                         InetAddress localAddr, int localPort)
>     throws SocketException, IOException
>     {
>         _socket_ = _socketFactory_.createSocket(hostname, port, localAddr, localPort);
>         _connectAction_();
>     }
> {code}
> Working alternative:
> {code:title=SocketClient.java (line 225)|borderStyle=solid}
>     public void connect(String hostname, int port,
>                         InetAddress localAddr, int localPort)
>     throws SocketException, IOException
>     {
>         _socket_ = _socketFactory_.createSocket();
>         _socket_.bind(new InetSocketAddress(localAddr, localPort));
>         _socket_.connect(new InetSocketAddress(hostname, port), connectTimeout);
>         _connectAction_();
>     }
> {code}

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


[jira] Updated: (NET-307) One of the "connect" method in class org.apache.commons.net.SocketClient doesn't handle connection timeout properly

Posted by "Sebb (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/NET-307?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sebb updated NET-307:
---------------------

    Fix Version/s:     (was: 2.1)
                   3.0

Fixed in r474098 and r473763 which were included in release 2.0

> One of the "connect" method in class org.apache.commons.net.SocketClient doesn't handle connection timeout properly
> -------------------------------------------------------------------------------------------------------------------
>
>                 Key: NET-307
>                 URL: https://issues.apache.org/jira/browse/NET-307
>             Project: Commons Net
>          Issue Type: Improvement
>    Affects Versions: 2.0
>         Environment: Not applicable
>            Reporter: sg
>            Priority: Minor
>             Fix For: 2.0
>
>
> org.apache.commons.net.SocketClient method connect (line 225) doesn't use the configured timeout value.
> Original code:
> {code:title=SocketClient.java (line 225)|borderStyle=solid}
>     public void connect(String hostname, int port,
>                         InetAddress localAddr, int localPort)
>     throws SocketException, IOException
>     {
>         _socket_ = _socketFactory_.createSocket(hostname, port, localAddr, localPort);
>         _connectAction_();
>     }
> {code}
> Working alternative:
> {code:title=SocketClient.java (line 225)|borderStyle=solid}
>     public void connect(String hostname, int port,
>                         InetAddress localAddr, int localPort)
>     throws SocketException, IOException
>     {
>         _socket_ = _socketFactory_.createSocket();
>         _socket_.bind(new InetSocketAddress(localAddr, localPort));
>         _socket_.connect(new InetSocketAddress(hostname, port), connectTimeout);
>         _connectAction_();
>     }
> {code}

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