mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-05-09 23:51:34 +08:00
修复Sftp中传入Session重连时逻辑错误问题(issue#IB69U8@Gitee)
This commit is contained in:
parent
c50625e215
commit
6d91319391
@ -156,7 +156,7 @@ public class JschSftp extends AbstractFtp {
|
||||
.getRaw();
|
||||
}
|
||||
|
||||
if (false == session.isConnected()) {
|
||||
if (!session.isConnected()) {
|
||||
// issue#I9CH6A 首先Session需连接
|
||||
try {
|
||||
session.connect((int) this.ftpConfig.getConnector().getTimeout());
|
||||
@ -185,9 +185,6 @@ public class JschSftp extends AbstractFtp {
|
||||
|
||||
@Override
|
||||
public JschSftp reconnectIfTimeout() {
|
||||
if (StrUtil.isBlank(this.ftpConfig.getConnector().getHost())) {
|
||||
throw new FtpException("Host is blank!");
|
||||
}
|
||||
try {
|
||||
this.cd(StrUtil.SLASH);
|
||||
} catch (final FtpException e) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user