mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-05-09 23:51:34 +08:00
fix bug
This commit is contained in:
parent
b2cc737a82
commit
6a29172e86
@ -3,7 +3,7 @@
|
||||
|
||||
-------------------------------------------------------------------------------------------------------------
|
||||
|
||||
# 5.6.4 (2021-04-18)
|
||||
# 5.6.4 (2021-04-19)
|
||||
|
||||
### 新特性
|
||||
* 【core 】 DatePattern补充DateTimeFormatter(pr#308@Gitee)
|
||||
@ -13,6 +13,7 @@
|
||||
|
||||
### Bug修复
|
||||
* 【db 】 修复SQL分页时未使用别名导致的错误,同时count时取消order by子句(issue#I3IJ8X@Gitee)
|
||||
* 【extra 】 修复Sftp.reconnectIfTimeout方法判断错误(issue#1524@Github)
|
||||
|
||||
-------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user