mirror of
https://github.com/neon443/ShhShell.git
synced 2026-03-11 13:26:16 +00:00
fix crash if we try to get the hostkey when not connected!!
instead of checking connected, ssh_is_connected(session) == 0
This commit is contained in:
@@ -47,7 +47,7 @@ class SSHHandler: @unchecked Sendable, ObservableObject {
|
||||
}
|
||||
|
||||
func getHostkey() -> String? {
|
||||
guard connected else { return nil }
|
||||
guard ssh_is_connected(session) == 0 else { return nil }
|
||||
|
||||
var hostkey: ssh_key?
|
||||
ssh_get_server_publickey(session, &hostkey)
|
||||
|
||||
Reference in New Issue
Block a user