Ftp
class represents a single control connection to the FTP server.
Upload
and Download
methods create a data connection and transfer appropriate data to od from the server.
You are free to use 'Ftp' instance as long as you want, however you need to understand, that most servers will cut your connection after some inactivity period (the timeout is usually set to couple of minutes, some routers may be even more aggressive). This will result in an exception on the subsequent operation.
Looking at your code, the problem is with you using an using
clause:
using (Ftp client = new Ftp())
...it disposes the Ftp
instance and closes the underlying connection as soon as it exits FTPConnect
method.