simlplify read from channel loop

main thread ui updates in disconnect()
This commit is contained in:
neon443
2025-06-26 12:32:18 +01:00
parent 42883c4ac9
commit 319373682c
3 changed files with 10 additions and 11 deletions

View File

@@ -127,8 +127,10 @@ class SSHHandler: @unchecked Sendable, ObservableObject {
}
func disconnect() {
withAnimation { self.state = .idle }
withAnimation { self.testSuceeded = nil }
DispatchQueue.main.async {
withAnimation { self.state = .idle }
withAnimation { self.testSuceeded = nil }
}
//send eof if open
if ssh_channel_is_open(channel) == 1 {