You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by se...@apache.org on 2012/01/05 23:04:18 UTC

svn commit: r1227866 - in /commons/proper/net/trunk/src: changes/changes.xml main/java/org/apache/commons/net/ftp/FTPClient.java

Author: sebb
Date: Thu Jan  5 22:04:17 2012
New Revision: 1227866

URL: http://svn.apache.org/viewvc?rev=1227866&view=rev
Log:
NET-423 FTPClient.storeFIle might fail when ControlKeepAliveTimeout is set (ditto for FTPCLient.retrieveFile)

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=1227866&r1=1227865&r2=1227866&view=diff
==============================================================================
--- commons/proper/net/trunk/src/changes/changes.xml (original)
+++ commons/proper/net/trunk/src/changes/changes.xml Thu Jan  5 22:04:17 2012
@@ -59,6 +59,9 @@ The <action> type attribute can be add,u
         <release version="3.1-SNAPSHOT" date="TBA" description="
 TBA
         ">
+            <action issue="NET-423" dev="sebb" type="fix" due-to="Jens Koch">
+            FTPClient.storeFIle might fail when ControlKeepAliveTimeout is set (ditto for FTPCLient.retrieveFile)
+            </action>
             <action issue="NET-426" dev="sebb" type="add" due-to="Ketan">
             FTPS: Hook to customize _openDataConnection_ SSLSocket before startHandshake() is called
             </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=1227866&r1=1227865&r2=1227866&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 Thu Jan  5 22:04:17 2012
@@ -586,11 +586,11 @@ implements Configurable
 
         output.close(); // ensure the file is fully written
         socket.close(); // done writing the file
-        // Get the transfer response
-        boolean ok = completePendingCommand();
         if (csl != null) {
             csl.cleanUp(); // fetch any outstanding keepalive replies
         }
+        // Get the transfer response
+        boolean ok = completePendingCommand();
         return ok;
     }
 
@@ -1668,11 +1668,11 @@ implements Configurable
             Util.closeQuietly(socket);
         }
 
-        // Get the transfer response
-        boolean ok = completePendingCommand();
         if (csl != null) {
             csl.cleanUp(); // fetch any outstanding keepalive replies
         }
+        // Get the transfer response
+        boolean ok = completePendingCommand();
         return ok;
     }