FluentFTP icon indicating copy to clipboard operation
FluentFTP copied to clipboard

Any event triggered to catch the disconnect events of connected FtpClient?

Open TahaBerkay opened this issue 4 years ago • 1 comments

I'm using hosted service (IHostedService) to keep the connection always open in order to avoid connection overhead. (e.g. call FtpClient.Connect at StartAsync method only and FtpClient.Disconnect at StopAsync) And the FTP operations are done in the same connection during the application lifetime.

Is there any event fired if the FTP server disconnects or gets down? So, I could try to reconnect periodically to get the connection back alive.

TahaBerkay avatar May 29 '21 15:05 TahaBerkay

No event at present. You can try to implement it by checking in the stream classes, which implement the actual socket to the server.

robinrodricks avatar May 29 '21 19:05 robinrodricks

Added to the bucket list. We will pick this up as and when we have free time. Comment on this issue if you want us to prioritize it. Thanks!

robinrodricks avatar Sep 19 '22 14:09 robinrodricks