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

sftp: don't retry permanent connection errors

Nick Craig-Wood83a366beae52
diff --git a/backend/sftp/sftp.go b/backend/sftp/sftp.go
index f798d7a49..1d14e17f2 100644
--- a/backend/sftp/sftp.go
+++ b/backend/sftp/sftp.go
@@ -824,7 +824,7 @@ func (f *Fs) getSftpConnection(ctx context.Context) (c *conn, err error) {
err = f.pacer.Call(func() (bool, error) {
c, err = f.sftpConnection(ctx)
if err != nil {
- return true, err
+ return fserrors.ShouldRetry(err), err
}
return false, nil
})