Skip to content

Commit 7d7d440

Browse files
committed
fix bug
1 parent b6b8c28 commit 7d7d440

File tree

1 file changed

+1
-1
lines changed
  • hutool-extra/src/main/java/cn/hutool/extra/ssh

1 file changed

+1
-1
lines changed

hutool-extra/src/main/java/cn/hutool/extra/ssh/Sftp.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ public void init(String sshHost, int sshPort, String sshUser, String sshPass, Ch
169169
*/
170170
public void init() {
171171
// issue#IB69U8 如果用户传入Session对象,则不能使用配置初始化,而是尝试重新连接
172-
if(StrUtil.isEmpty(this.ftpConfig.getHost()) && null != this.session){
172+
if(null != this.session){
173173
try {
174174
this.session.connect((int) this.ftpConfig.getConnectionTimeout());
175175
} catch (JSchException e) {

0 commit comments

Comments
 (0)