mirror of
https://github.com/neon443/ShhShell.git
synced 2026-03-11 13:26:16 +00:00
switched while loop out for a guard to break the loop
This commit is contained in:
@@ -71,8 +71,8 @@ class SSHHandler: @unchecked Sendable, ObservableObject {
|
||||
|
||||
//TODO: check hostkey
|
||||
|
||||
while state != .authorized {
|
||||
for method in getAuthMethods() {
|
||||
guard state != .authorized else { break }
|
||||
switch method {
|
||||
case .password:
|
||||
do { try authWithPw() } catch {
|
||||
@@ -92,7 +92,6 @@ class SSHHandler: @unchecked Sendable, ObservableObject {
|
||||
disconnect()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ssh_channel_request_env(channel, "TERM", "xterm-256color")
|
||||
ssh_channel_request_env(channel, "LANG", "en_US.UTF-8")
|
||||
|
||||
Reference in New Issue
Block a user