This commit is contained in:
Looly 2021-04-19 13:19:09 +08:00
parent b2cc737a82
commit 6a29172e86
2 changed files with 10 additions and 3 deletions

View File

@ -3,7 +3,7 @@
-------------------------------------------------------------------------------------------------------------
# 5.6.4 (2021-04-18)
# 5.6.4 (2021-04-19)
### 新特性
* 【core 】 DatePattern补充DateTimeFormatterpr#308@Gitee
@ -13,6 +13,7 @@
### Bug修复
* 【db 】 修复SQL分页时未使用别名导致的错误同时count时取消order by子句issue#I3IJ8X@Gitee
* 【extra 】 修复Sftp.reconnectIfTimeout方法判断错误issue#1524@Github
-------------------------------------------------------------------------------------------------------------

View File

@ -172,8 +172,14 @@ public class Sftp extends AbstractFtp {
@Override
public Sftp reconnectIfTimeout() {
if (false == this.cd("/") && StrUtil.isNotBlank(this.ftpConfig.getHost())) {
init(this.ftpConfig);
if(StrUtil.isBlank(this.ftpConfig.getHost())){
throw new FtpException("Host is blank!");
}
try{
this.cd(StrUtil.SLASH);
} catch (FtpException e){
close();
init();
}
return this;
}