In FtpImpl.java also setSoTimeout(_timeout); in initialize(boolean bConnect)
----------------------------------------------------------------------------
Key: JBESB-3320
URL:
https://jira.jboss.org/jira/browse/JBESB-3320
Project: JBoss ESB
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: Transports
Affects Versions: 4.7
Reporter: jarkko Lietolahti
Fix For: 4.9
Currently FtpImpl.java (and the others) only set DataTimeout on m_oConn. We're seeing
firewall issues where this is not enough and we need SoTimeout for the socket in order to
avoid infinite waiting during __getReply();
So also call m_oConn.setSoTimeout(_timeout);
Aka;
{code}
if (_timeout > 0)
{
m_oConn.setDataTimeout(_timeout);
// added by jarkko lietolahti, 9.2.2010 to address hanging replies from server
m_oConn.setSoTimeout(_timeout);
}
{code}
The hanging occurs in org.apache.commons.net.ftp.FTP.__getReply() in line String line =
_controlInput_.readLine();
The readLine() will hang forever if the server/firewall is blocking/etc fails to send
reply through the control channel.
There's also FTP.setDefaultTimeout
(
http://commons.apache.org/net/api/org/apache/commons/net/SocketClient.htm...)
maybe we should set it also? Or maybe we need three different configuration parameters.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira