You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by GitBox <gi...@apache.org> on 2020/07/21 14:54:02 UTC

[GitHub] [commons-net] simo385 opened a new pull request #51: NET-685: change default connect timeout

simo385 opened a new pull request #51:
URL: https://github.com/apache/commons-net/pull/51


   I changed the socket **DEFAULT_CONNECT_TIMEOUT** value, because, if the server doesn't reply and I don't set the connection timeout, the method _FTPClient.connect()_ hangs infinitely, blocking the whole JVM.
   
   This happens in the multi-threading environment.
   
   Even though there exist the method _setConnectTimeout()_ to set the timeout for Socket, I think a default value should be set-up in order to avoid production breakdown.
   
   Thanks to everybody.
   Simone


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [commons-net] garydgregory commented on pull request #51: NET-685: change default connect timeout

Posted by GitBox <gi...@apache.org>.
garydgregory commented on pull request #51:
URL: https://github.com/apache/commons-net/pull/51#issuecomment-731583402


   https://issues.apache.org/jira/browse/NET-685


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [commons-net] garydgregory merged pull request #51: NET-685: change default connect timeout

Posted by GitBox <gi...@apache.org>.
garydgregory merged pull request #51:
URL: https://github.com/apache/commons-net/pull/51


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [commons-net] garydgregory commented on pull request #51: NET-685: change default connect timeout

Posted by GitBox <gi...@apache.org>.
garydgregory commented on pull request #51:
URL: https://github.com/apache/commons-net/pull/51#issuecomment-735444433


   Since no one has piped up against this and it seems like a good idea, I will merge.
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [commons-net] simo385 commented on pull request #51: NET-685: change default connect timeout

Posted by GitBox <gi...@apache.org>.
simo385 commented on pull request #51:
URL: https://github.com/apache/commons-net/pull/51#issuecomment-732211772


   Dear @garydgregory,
   
   yes, currently, the workaround is to call _org.apache.commons.net.SocketClient.setConnectTimeout(int)_, but I've had a lot of problem in my production environment (multi-threading) because of infinity timeout. Also, I've spent a lot of time to find out the issue.
   
   I understand your worry, we can discuss the default timeout value, but IMHO to set a default timeout = infinity is really dangerous, especially in multi-threading environment.
   
   Many thanks for your support.
   Simone


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [commons-net] garydgregory commented on pull request #51: NET-685: change default connect timeout

Posted by GitBox <gi...@apache.org>.
garydgregory commented on pull request #51:
URL: https://github.com/apache/commons-net/pull/51#issuecomment-731584798


   @simo385 
   I am not opposed to the idea but note that `SocketClient` is an abstract class with many subclasses. I am worried that there are some unintended functional side-effects that this change will cause. Any thoughts from others? I suppose your workaround is to call `org.apache.commons.net.SocketClient.setConnectTimeout(int)`?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org