Skip to content

Commit ea47f82

Browse files
committed
modified: src/SSH.swift
1 parent 2febb2a commit ea47f82

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/SSH.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ public class SSH {
150150
cancelSources()
151151
close(.channel)
152152
close(.sftp)
153-
_ = callSSH2 {
153+
if sockfd.isConnected {
154154
libssh2_session_disconnect_ex(rawSession, SSH_DISCONNECT_BY_APPLICATION, "SSH Term: Disconnect", "")
155155
}
156156
libssh2_session_free(rawSession)

0 commit comments

Comments
 (0)