mirror of
https://gitee.com/dromara/hutool.git
synced 2025-04-05 17:37:59 +08:00
fix bug
This commit is contained in:
parent
b6b8c28db8
commit
7d7d4406fc
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user