Skip to content

"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files

ftp: support --contimeout

Nick Craig-Wood9627a6142d62
diff --git a/docs/content/ftp.md b/docs/content/ftp.md
index c3906317e..1f70edae2 100644
--- a/docs/content/ftp.md
+++ b/docs/content/ftp.md
@@ -118,6 +118,6 @@ FTP does not support any checksums.
Note that since FTP isn't HTTP based the following flags don't work
with it: `--dump-headers`, `--dump-bodies`, `--dump-auth`
-Note that `--timeout` and `--contimeout` aren't supported.
+Note that `--timeout` isn't supported (but `--contimeout` is).
FTP could support server side move but doesn't yet.
diff --git a/ftp/ftp.go b/ftp/ftp.go
index fa3da5822..d8aca9476 100644
--- a/ftp/ftp.go
+++ b/ftp/ftp.go
@@ -2,7 +2,6 @@
package ftp
// FIXME Mover and DirMover are possible using c.Rename
-// FIXME support conntimeout
import (
"io"
@@ -93,7 +92,7 @@ func (f *Fs) Features() *fs.Features {
// Open a new connection to the FTP server.
func (f *Fs) ftpConnection() (*ftp.ServerConn, error) {
fs.Debugf(f, "Connecting to FTP server")
- c, err := ftp.DialTimeout(f.dialAddr, 30*time.Second)
+ c, err := ftp.DialTimeout(f.dialAddr, fs.Config.ConnectTimeout)
if err != nil {
fs.Errorf(f, "Error while Dialing %s: %s", f.dialAddr, err)
return nil, errors.Wrap(err, "ftpConnection Dial")