GH-8797: Fix DefSftpSessionFactory.timeout logic

Fixes https://github.com/spring-projects/spring-integration/issues/8797

After migration to Apache MINA we have missed to fix `DefaultSftpSessionFactory.timeout`
to be `0` by default as it states in its Javadocs and reference manual
It is `null` by default which really means an infinite wait.

* Fix `DefaultSftpSessionFactory.timeout` to be a reasonable 30 seconds by default
* Fix `setTimeout()` Javadocs and respective `session-factory.adoc`
* Propagate this `timeout` down to the `SftpClient` for its commands interactions
This commit is contained in:
Artem Bilan
2023-11-28 13:50:54 -05:00
committed by Christian Tzolov
parent 9f7acd7d9d
commit ba287aeb5b
3 changed files with 47 additions and 6 deletions

View File

@@ -97,7 +97,8 @@ The passphrase is obtained from that object.
Optional.
`timeout`::The timeout property is used as the socket timeout parameter, as well as the default connection timeout.
Defaults to `0`, which means, that no timeout will occur.
Defaults to `30 seconds`.
Setting to `0` means no timeout; to `null` - infinite wait.
[[sftp-unk-keys]]
`allowUnknownKeys`::Set to `true` to allow connections to hosts with unknown (or changed) keys.