mirror of
https://gitee.com/dromara/hutool.git
synced 2025-04-24 18:04:54 +08:00
修复jsch session.openSftp()未打开session问题
This commit is contained in:
parent
054aad0a53
commit
966941ca7b
@ -152,6 +152,15 @@ public class JschSftp extends AbstractFtp {
|
||||
.getRaw();
|
||||
}
|
||||
|
||||
if (false == session.isConnected()) {
|
||||
// issue#I9CH6A 首先Session需连接
|
||||
try {
|
||||
session.connect((int) this.ftpConfig.getConnector().getTimeout());
|
||||
} catch (final JSchException e) {
|
||||
throw new SshException(e);
|
||||
}
|
||||
}
|
||||
|
||||
// 创建Channel
|
||||
try {
|
||||
this.channel = (ChannelSftp) this.session.openChannel(ChannelType.SFTP.getValue());
|
||||
|
Loading…
Reference in New Issue
Block a user