Skip to content

Commit e35e41d

Browse files
author
jzy
committed
fix:disconnect() NPE
1 parent 3857d67 commit e35e41d

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

android/src/main/java/flutter/ssh2/SshPlugin.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -604,12 +604,13 @@ private void disconnectSFTP(final HashMap args) {
604604
}
605605

606606
private void disconnect(final HashMap args) {
607-
this.closeShell(args);
608-
this.disconnectSFTP(args);
609-
610-
SSHClient client = clientPool.get(args.get("id"));
607+
SSHClient client = clientPool.gets(args.get("id"));
611608
if (client == null)
612609
return;
610+
611+
this.closeShell(args);
612+
this.disconnectSFTP(args);
613+
613614
client._session.disconnect();
614615
}
615616

0 commit comments

Comments
 (0)