diff --git a/Frends.SFTP.DownloadFiles/CHANGELOG.md b/Frends.SFTP.DownloadFiles/CHANGELOG.md index 5f24be1..f7c603d 100644 --- a/Frends.SFTP.DownloadFiles/CHANGELOG.md +++ b/Frends.SFTP.DownloadFiles/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## [2.7.1] - 2023-09-08 +### Added +- Added SFTPClient.OperationTimeout which should cause timeout during operations if the Task becomes stuck. + ## [2.7.0] - 2023-06-07 ### Added - [Breaking] Added new parameter for keyboard-interactive authentication where users can add prompts and responses. diff --git a/Frends.SFTP.DownloadFiles/Frends.SFTP.DownloadFiles/Definitions/FileTransporter.cs b/Frends.SFTP.DownloadFiles/Frends.SFTP.DownloadFiles/Definitions/FileTransporter.cs index 3bdc3f6..e2965dc 100644 --- a/Frends.SFTP.DownloadFiles/Frends.SFTP.DownloadFiles/Definitions/FileTransporter.cs +++ b/Frends.SFTP.DownloadFiles/Frends.SFTP.DownloadFiles/Definitions/FileTransporter.cs @@ -95,6 +95,7 @@ public FileTransferResult Run() client.ConnectionInfo.Timeout = TimeSpan.FromSeconds(_batchContext.Connection.ConnectionTimeout); client.KeepAliveInterval = TimeSpan.FromMilliseconds(_batchContext.Connection.KeepAliveInterval); + client.OperationTimeout = TimeSpan.FromSeconds(_batchContext.Connection.ConnectionTimeout); client.BufferSize = _batchContext.Connection.BufferSize * 1024; @@ -429,8 +430,6 @@ private void CheckServerFingerprint(SftpClient client, string expectedServerFing private Tuple, bool> ListSourceFiles(SftpClient client, Source source, CancellationToken cancellationToken) { - //SetCurrentState(TransferState.CheckSourceFiles, "Checking source files."); - var fileItems = new List(); if (_filePaths != null) diff --git a/Frends.SFTP.DownloadFiles/Frends.SFTP.DownloadFiles/Frends.SFTP.DownloadFiles.csproj b/Frends.SFTP.DownloadFiles/Frends.SFTP.DownloadFiles/Frends.SFTP.DownloadFiles.csproj index e28c21a..405810d 100644 --- a/Frends.SFTP.DownloadFiles/Frends.SFTP.DownloadFiles/Frends.SFTP.DownloadFiles.csproj +++ b/Frends.SFTP.DownloadFiles/Frends.SFTP.DownloadFiles/Frends.SFTP.DownloadFiles.csproj @@ -8,7 +8,7 @@ Frends.SFTP.DownloadFiles Frends.SFTP.DownloadFiles - 2.7.0 + 2.7.1 Frends Frends Frends