commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paul Stanton (JIRA)" <j...@apache.org>
Subject [jira] Commented: (NET-35) [net] FTPClient.setDataTimeout() should contain a default timeout
Date Mon, 25 Jan 2010 08:05:34 GMT

    [ https://issues.apache.org/jira/browse/NET-35?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12804435#action_12804435
] 

Paul Stanton commented on NET-35:
---------------------------------

this has just caused me a MAJOR headache. it's blocked a thread for over a week and effectively
halted my serialisation procedure. the documentation does not make it obvious that NOT setting
a timeout could eventuate in such a problem. I actually do set this timeout directly after
I call the 'connect' method (along with setSoTimeout) however it's the connect method which
is blocking.

please re-open and resolve, default it to 5 days if necessary!!

> [net] FTPClient.setDataTimeout() should contain a default timeout
> -----------------------------------------------------------------
>
>                 Key: NET-35
>                 URL: https://issues.apache.org/jira/browse/NET-35
>             Project: Commons Net
>          Issue Type: Bug
>    Affects Versions: 1.2
>         Environment: Operating System: Windows 2000
> Platform: PC
>            Reporter: David Parks
>
> The method FTPClient.setDataTimeout() appears not to have a default value, or 
> better said, it appears that the default value is 0, meaning that if a socket 
> hangs (which will happen with an ftp connection eventually) you may block 
> indefinately waiting on the connection.
> If we omit a call to setDataTimeout() it's almost certain that we will face a 
> bug in our code later on, and unfortunately it's relatively unlikely that this 
> bug will be caught in development. I think it would be far safer to have a 
> default timeout value of say, pick a number, maybe 60 seconds? Those that need 
> this changes should specically call it to make the change. If you do want it to 
> block indefinately (I doubt almost anyone actually wants this) then they should 
> explicitly set this to 0, but I think 99.9% of your users will actually want a 
> resonable timeout, thus it would be best to set this 'resonable' timeout value 
> as the default to safeguard those that miss adding it to their code.
> Thanks,
> David Parks

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


Mime
View raw message