From 9627a6142d626ddf56e8b6a9c530fca35c505e34 Mon Sep 17 00:00:00 2001 From: Nick Craig-Wood Date: Thu, 18 May 2017 16:20:26 +0100 Subject: [PATCH] ftp: support --contimeout --- docs/content/ftp.md | 2 +- ftp/ftp.go | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) 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")