1
0
mirror of https://gitee.com/dromara/hutool.git synced 2025-04-05 17:37:59 +08:00
This commit is contained in:
Looly 2024-12-09 20:54:21 +08:00
parent b6b8c28db8
commit 7d7d4406fc

View File

@ -169,7 +169,7 @@ public class Sftp extends AbstractFtp {
*/
public void init() {
// issue#IB69U8 如果用户传入Session对象则不能使用配置初始化而是尝试重新连接
if(StrUtil.isEmpty(this.ftpConfig.getHost()) && null != this.session){
if(null != this.session){
try {
this.session.connect((int) this.ftpConfig.getConnectionTimeout());
} catch (JSchException e) {