Skip to content

Commit 983cefb

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

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

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

Lines changed: 4 additions & 3 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-
610607
SSHClient client = clientPool.get(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)