You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Sebb (Resolved) (JIRA)" <ji...@apache.org> on 2012/01/05 23:06:39 UTC

[jira] [Resolved] (NET-423) FTPClient.storeFIle might fail when ControlKeepAliveTimeout is set

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

Sebb resolved NET-423.
----------------------

       Resolution: Fixed
    Fix Version/s: 3.1

Same fix applies to retrieveFile method.
                
> FTPClient.storeFIle might fail when ControlKeepAliveTimeout is set
> ------------------------------------------------------------------
>
>                 Key: NET-423
>                 URL: https://issues.apache.org/jira/browse/NET-423
>             Project: Commons Net
>          Issue Type: Bug
>          Components: FTP
>    Affects Versions: 3.0.1
>            Reporter: Jens Koch
>            Priority: Minor
>             Fix For: 3.1
>
>
> When setting ControlKeepAliveTimeout. FTPClient.__storeFile might fail when waiting for ack on ControlConnection.
> Current code:
> {noformat}
>         // Get the transfer response
>         boolean ok = completePendingCommand();
>         if (csl != null) {
>             csl.cleanUp(); // fetch any outstanding keepalive replies
>         }
> {noformat}
> While CSL is active, the ControlConnection timeout is set to 1 sec., if using default. This timeout value doesn't leave much room in terms of network/end point latency.
> Replacing the code fragment above with the following fragment probably solves the problem (If proper ControlConnection timeout value is set):
> {noformat}
>         if (csl != null) {
>             csl.cleanUp(); // fetch any outstanding keepalive replies
>         }
>         // Get the transfer response
>         boolean ok = completePendingCommand();
> {noformat}
> One workaround is to set ControlKeepAliveReplyTimeout to a higher value.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira