[jira] Created: (VFS-313) CLONE -FTP configuration does not include option for setting socket timeout

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[jira] Created: (VFS-313) CLONE -FTP configuration does not include option for setting socket timeout

Gilles (Jira)
CLONE -FTP configuration does not include option for setting socket timeout
---------------------------------------------------------------------------

                 Key: VFS-313
                 URL: https://issues.apache.org/jira/browse/VFS-313
             Project: Commons VFS
          Issue Type: Bug
    Affects Versions: 1.1
            Reporter: Brad Davis
             Fix For: 2.0


The FTP Configuration includes an option to set a timeout for the data connection, but not for the socket timeout. This is a problem, as idle sockets can cause your download to hang forever and never timeout.

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

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (VFS-313) CLONE -FTP configuration does not include option for setting socket timeout

Gilles (Jira)

    [ https://issues.apache.org/jira/browse/VFS-313?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12887916#action_12887916 ]

Brad Davis commented on VFS-313:
--------------------------------

The original issue / patch does not resolve the issue.  If you look at the order of operations, the so timeout is set only after the client.connect(hostname, port); has been called, meaning the socket can hang on the connection.  Attached is a patch which resolves this and allows for a two seperate timeout values, one for connect and one for the control connection communications in general (the previously added  setSoTimeout)

> CLONE -FTP configuration does not include option for setting socket timeout
> ---------------------------------------------------------------------------
>
>                 Key: VFS-313
>                 URL: https://issues.apache.org/jira/browse/VFS-313
>             Project: Commons VFS
>          Issue Type: Bug
>    Affects Versions: 1.1
>            Reporter: Brad Davis
>             Fix For: 2.0
>
>
> The FTP Configuration includes an option to set a timeout for the data connection, but not for the socket timeout. This is a problem, as idle sockets can cause your download to hang forever and never timeout.

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

Reply | Threaded
Open this post in threaded view
|

[jira] Updated: (VFS-313) CLONE -FTP configuration does not include option for setting socket timeout

Gilles (Jira)
In reply to this post by Gilles (Jira)

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

Brad Davis updated VFS-313:
---------------------------

    Attachment: patch.txt

this patch adds a new timeout value to the client builder, allowing for the timeout to be set BEFORE issuing the connect command.

> CLONE -FTP configuration does not include option for setting socket timeout
> ---------------------------------------------------------------------------
>
>                 Key: VFS-313
>                 URL: https://issues.apache.org/jira/browse/VFS-313
>             Project: Commons VFS
>          Issue Type: Bug
>    Affects Versions: 1.1
>            Reporter: Brad Davis
>             Fix For: 2.0
>
>         Attachments: patch.txt
>
>
> The FTP Configuration includes an option to set a timeout for the data connection, but not for the socket timeout. This is a problem, as idle sockets can cause your download to hang forever and never timeout.

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

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (VFS-313) CLONE -FTP configuration does not include option for setting socket timeout

Gilles (Jira)
In reply to this post by Gilles (Jira)

    [ https://issues.apache.org/jira/browse/VFS-313?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12887919#action_12887919 ]

Brad Davis commented on VFS-313:
--------------------------------

Alternate solutions would be to use the existing soTimeout value, but use it as the parameter to setDefaultTimeout()  before the connect statement, or to have the code look for a connectTimeout and then if none is set use the soTimeout value to setDefaultTimeout() before the connect call.

> CLONE -FTP configuration does not include option for setting socket timeout
> ---------------------------------------------------------------------------
>
>                 Key: VFS-313
>                 URL: https://issues.apache.org/jira/browse/VFS-313
>             Project: Commons VFS
>          Issue Type: Bug
>    Affects Versions: 1.1
>            Reporter: Brad Davis
>             Fix For: 2.0
>
>         Attachments: patch.txt
>
>
> The FTP Configuration includes an option to set a timeout for the data connection, but not for the socket timeout. This is a problem, as idle sockets can cause your download to hang forever and never timeout.

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