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 2017/03/16 12:18:53 UTC

svn commit: r1787166 - /commons/proper/net/trunk/src/main/java/org/apache/commons/net/ftp/FTPClient.java

Author: sebb
Date: Thu Mar 16 12:18:53 2017
New Revision: 1787166

URL: http://svn.apache.org/viewvc?rev=1787166&view=rev
Log:
Ensure __cslDebug is always updated

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

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=1787166&r1=1787165&r2=1787166&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 Mar 16 12:18:53 2017
@@ -685,17 +685,16 @@ implements Configurable
         catch (IOException e)
         {
             Util.closeQuietly(socket); // ignore close errors here
+            throw e;
+        } finally {
             if (csl != null) {
                 __cslDebug = csl.cleanUp(); // fetch any outstanding keepalive replies
             }
-            throw e;
         }
 
         output.close(); // ensure the file is fully written
         socket.close(); // done writing the file
-        if (csl != null) {
-            csl.cleanUp(); // fetch any outstanding keepalive replies
-        }
+
         // Get the transfer response
         boolean ok = completePendingCommand();
         return ok;