This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-vfs.git

commit ba5f78b52756310b22214610bf21bfeb8a4f14ce
Author: Gary Gregory <[email protected]>
AuthorDate: Thu Feb 11 11:33:41 2021 -0500

    Use better Duration API.
---
 .../java/org/apache/commons/vfs2/provider/ftp/FtpClientFactory.java     | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/ftp/FtpClientFactory.java
 
b/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/ftp/FtpClientFactory.java
index 4d6c40f..341a076 100644
--- 
a/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/ftp/FtpClientFactory.java
+++ 
b/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/ftp/FtpClientFactory.java
@@ -197,7 +197,7 @@ public final class FtpClientFactory {
                     final Duration controlKeepAliveTimeout = 
builder.getControlKeepAliveTimeout(fileSystemOptions);
                     if (controlKeepAliveTimeout != null) {
                         // yes, in seconds.
-                        
client.setControlKeepAliveTimeout(controlKeepAliveTimeout.toMillis() / 1000);
+                        
client.setControlKeepAliveTimeout(controlKeepAliveTimeout.getSeconds());
                     }
 
                     final Duration controlKeepAliveReplyTimeout = builder

Reply via email to