Rclone copy to FTP: rclone sends a QUIT and never ends itself

Bisection pointed me to the first patch introducing support for FTP's explicit_tls in rclone. In fact 1.52.3 did not recognize the explicit_tls parameter, ignored it and accessed FTP by plain protocol. Thus, the explicit_tls mode always had the problem in question.

Surfing through the github threads related to the FTP TLS bugs, I stumbled upon this comment: Failing data connection with STARTTLS (Explicit TLS): tls session not reused · Issue #49 · secsy/goftp · GitHub

I then made a patch adding tls session cache in the ftp backend: Commits · ivandeex/rclone · GitHub
Running rclone with tls cache enabled fixed the upload to hetzner storage for me. This is nice because FTP+TLS gives me the 80MB/s upload speed while workaround with SFTP capped at 40MB/s, both being securely encryped.

FWIW Please try rclone beta with the patch from Release v1.55.1-ftp02 · ivandeex/rclone · GitHub
Note that I don't fully understand all security implications of tls session cache or how big it should be, so by default it's disabled. To enable it and fix the 450 problem, you should enable it manually via command line flag --ftp-tls-cache-size=64, or add the line tls_cache_size = 64 in the ftp section of rclone.conf

Please let me know if it helped you. Maybe it deserves submitting a patch for the mainline rclone.