commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1089272 - in /commons/proper/net/trunk/src: changes/changes.xml main/java/org/apache/commons/net/ftp/FTPClient.java
Date Tue, 05 Apr 2011 22:22:22 GMT
Author: sebb
Date: Tue Apr  5 22:22:22 2011
New Revision: 1089272

URL: http://svn.apache.org/viewvc?rev=1089272&view=rev
Log:
NET-399 ftp data connection does not use connectTimeout

Modified:
    commons/proper/net/trunk/src/changes/changes.xml
    commons/proper/net/trunk/src/main/java/org/apache/commons/net/ftp/FTPClient.java

Modified: commons/proper/net/trunk/src/changes/changes.xml
URL: http://svn.apache.org/viewvc/commons/proper/net/trunk/src/changes/changes.xml?rev=1089272&r1=1089271&r2=1089272&view=diff
==============================================================================
--- commons/proper/net/trunk/src/changes/changes.xml (original)
+++ commons/proper/net/trunk/src/changes/changes.xml Tue Apr  5 22:22:22 2011
@@ -67,6 +67,9 @@ This release is binary-compatible with 2
   - ftp.FTPSClient ctors no longer throw NoSuchAlgorithmException
   All users are recommended to upgrade.
 ">
+            <action issue="NET-399" dev="sebb" type="fix" due-to="Noah Levitt">
+            ftp data connection does not use connectTimeout.
+            </action>
             <action issue="NET-400" dev="sebb" type="update" due-to="David Kocher">
             Option to override SSL negotiation. Make FTPSClient#execAuth() and FTPSClient#sslNegotiation()
protected
             </action>

Modified: commons/proper/net/trunk/src/main/java/org/apache/commons/net/ftp/FTPClient.java
URL: http://svn.apache.org/viewvc/commons/proper/net/trunk/src/main/java/org/apache/commons/net/ftp/FTPClient.java?rev=1089272&r1=1089271&r2=1089272&view=diff
==============================================================================
--- commons/proper/net/trunk/src/main/java/org/apache/commons/net/ftp/FTPClient.java (original)
+++ commons/proper/net/trunk/src/main/java/org/apache/commons/net/ftp/FTPClient.java Tue Apr
 5 22:22:22 2011
@@ -26,6 +26,7 @@ import java.io.OutputStream;
 import java.io.OutputStreamWriter;
 import java.net.Inet6Address;
 import java.net.InetAddress;
+import java.net.InetSocketAddress;
 import java.net.ServerSocket;
 import java.net.Socket;
 import java.net.SocketException;
@@ -704,7 +705,8 @@ implements Configurable
                 __parsePassiveModeReply(_replyLines.get(0));
             }
 
-            socket = _socketFactory_.createSocket(__passiveHost, __passivePort);
+            socket = _socketFactory_.createSocket();
+            socket.connect(new InetSocketAddress(__passiveHost, __passivePort), connectTimeout);
             if ((__restartOffset > 0) && !restart(__restartOffset))
             {
                 socket.close();



Mime
View raw message