made it a while loop to not do the rest of the auth methods if one suceeds

This commit is contained in:
neon443 committed 2025-07-03 12:35:51 +01:00
1 parent 0ba1d5091e
commit 4f7b948fa4
1 file changed
+2 -2
+2 -2
View File
@@ -71,6 +71,7 @@ class SSHHandler: @unchecked Sendable, ObservableObject {
//TODO: check hostkey //TODO: check hostkey
while state != .authorized {
for method in getAuthMethods() { for method in getAuthMethods() {
switch method { switch method {
case .password: case .password:
@@ -91,8 +92,7 @@ class SSHHandler: @unchecked Sendable, ObservableObject {
disconnect() disconnect()
} }
} }
}
guard state == .authorized else { return }
ssh_channel_request_env(channel, "TERM", "xterm-256color") ssh_channel_request_env(channel, "TERM", "xterm-256color")
ssh_channel_request_env(channel, "LANG", "en_US.UTF-8") ssh_channel_request_env(channel, "LANG", "en_US.UTF-8")
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.