write to channel works!!!!!!!!!!!!!!!!!

removing the read funciton call fixed it
This commit is contained in:
neon443 committed 2025-06-21 12:58:43 +01:00
1 parent 5fafc52913
commit c33e22cd3d
2 files changed
+3 -2

No files matched your search

+2 -1
View File
@@ -88,6 +88,7 @@ class SSHHandler: ObservableObject {
withAnimation { connected = false } withAnimation { connected = false }
withAnimation { testSuceeded = nil } withAnimation { testSuceeded = nil }
session = nil session = nil
terminal = ""
// host.key = nil // host.key = nil
} }
@@ -336,7 +337,7 @@ class SSHHandler: ObservableObject {
var nwritten: Int var nwritten: Int
// readFromChannel() // readFromChannel()
nbytes = Int(read(0, &buffer, buffer.count)) // nbytes = Int(read(0, &buffer, buffer.count))
nbytes = buffer.count nbytes = buffer.count
guard nbytes > 0 else { guard nbytes > 0 else {
return return
@@ -28,8 +28,8 @@ struct TextViewController: UIViewRepresentable {
} }
private func setTextViewState(on textView: TextView) { private func setTextViewState(on textView: TextView) {
DispatchQueue.global(qos: .userInitiated).async {
let text = self.text let text = self.text
DispatchQueue.global(qos: .userInitiated).async {
let state = TextViewState(text: text, language: .bash) let state = TextViewState(text: text, language: .bash)
DispatchQueue.main.async { DispatchQueue.main.async {
textView.setState(state) textView.setState(state)
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.