I have already used try-catch, but it still crashes.
using var ftp = new AsyncFtpClient(ip, username, password);
ftp.Config.ConnectTimeout = 30000;
ftp.Config.ReadTimeout = 60000;
ftp.Config.DataConnectionConnectTimeout = 30000;
ftp.Config.DataConnectionReadTimeout = 60000;
.....
try{
var status = await ftp.DownloadFile(localFilePath, remoteFilePath,
FtpLocalExists.Resume,
FtpVerify.Delete | FtpVerify.Retry, progress);
}
catch{}
Application: BearCapture.UI.exe CoreCLR Version: 8.0.2526.11203 .NET Version: 8.0.25 Description: The process was terminated due to an unhandled exception. Exception Info: System.TimeoutException: Timed out trying to read data from the socket stream! at FluentFTP.FtpSocketStream.ReadAsync(Byte[] buffer, Int32 offset, Int32 count, CancellationToken token) at FluentFTP.FtpSocketStream.ReadLineAsync(Encoding encoding, CancellationToken token) at FluentFTP.Client.BaseClient.BaseFtpClient.FluentFTP.IInternalFtpClient.GetReplyInternal(CancellationToken token, String command, Boolean exhaustNoop, Int32 timeOut, Boolean useSema) at FluentFTP.Client.BaseClient.BaseFtpClient.FluentFTP.IInternalFtpClient.GetReplyInternal(CancellationToken token, String command) at FluentFTP.Client.BaseClient.BaseFtpClient.FluentFTP.IInternalFtpClient.CloseDataStreamInternal(FtpDataStream stream, CancellationToken token) at FluentFTP.Client.BaseClient.BaseFtpClient.FluentFTP.IInternalFtpClient.CloseDataStreamInternal(FtpDataStream stream, CancellationToken token) at FluentFTP.FtpDataStream.CloseAsync(CancellationToken token) at FluentFTP.FtpSocketStream.<>c__DisplayClass77_0.<b__0>d.MoveNext() --- End of stack trace from previous location --- at System.Threading.Tasks.Task.<>c.b__128_1(Object state) at System.Threading.ThreadPoolWorkQueue.Dispatch() at System.Threading.PortableThreadPool.WorkerThread.WorkerThreadStart()
I don't know if it has anything to do with my configuration.
I have already used try-catch, but it still crashes.
Application: BearCapture.UI.exe CoreCLR Version: 8.0.2526.11203 .NET Version: 8.0.25 Description: The process was terminated due to an unhandled exception. Exception Info: System.TimeoutException: Timed out trying to read data from the socket stream! at FluentFTP.FtpSocketStream.ReadAsync(Byte[] buffer, Int32 offset, Int32 count, CancellationToken token) at FluentFTP.FtpSocketStream.ReadLineAsync(Encoding encoding, CancellationToken token) at FluentFTP.Client.BaseClient.BaseFtpClient.FluentFTP.IInternalFtpClient.GetReplyInternal(CancellationToken token, String command, Boolean exhaustNoop, Int32 timeOut, Boolean useSema) at FluentFTP.Client.BaseClient.BaseFtpClient.FluentFTP.IInternalFtpClient.GetReplyInternal(CancellationToken token, String command) at FluentFTP.Client.BaseClient.BaseFtpClient.FluentFTP.IInternalFtpClient.CloseDataStreamInternal(FtpDataStream stream, CancellationToken token) at FluentFTP.Client.BaseClient.BaseFtpClient.FluentFTP.IInternalFtpClient.CloseDataStreamInternal(FtpDataStream stream, CancellationToken token) at FluentFTP.FtpDataStream.CloseAsync(CancellationToken token) at FluentFTP.FtpSocketStream.<>c__DisplayClass77_0.<b__0>d.MoveNext() --- End of stack trace from previous location --- at System.Threading.Tasks.Task.<>c.b__128_1(Object state) at System.Threading.ThreadPoolWorkQueue.Dispatch() at System.Threading.PortableThreadPool.WorkerThread.WorkerThreadStart()
I don't know if it has anything to do with my configuration.