-
-
Notifications
You must be signed in to change notification settings - Fork 685
Description
ver: 53.0.1
I need to syncly download ftp files to local, so I continuously fetch ftp dir and download files by using AsyncFtpClient's function[GetListing or GetListingEnumerable, DownloadFile] in 10-second intervals.
When using async class to operate ftp, it will cause A large number of newly created object [CancellationTokenSource]. I see it in vs2026's Diagnostic Tools

await foreach (var item in client.GetListingEnumerable(rPath, FtpListOption.Modify)); await client.DownloadFile(dest, path, FtpLocalExists.Overwrite, FtpVerify.None);
I even define parameters [CancellationTokenSource cts]'token for these method, it also cause memory leak due to CancellationTokenSource.
So I use FtpClient instead of AsyncFtpClient by sync class. Is it a bug?