mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-12-05 12:35:42 +00:00
fix(session): recheck a taken exit's child and commit a launch only on a whole go line
This commit is contained in:
1 parent
2ba290c2f1
commit
6f42e1cf1a
5 files changed
+35
-11
No files matched your search
@@ -652,13 +652,15 @@ object GuestWorkers {
|
||||
out.flush()
|
||||
answered = true
|
||||
client.soTimeout = ACK_TIMEOUT_MS
|
||||
// the whole line: a hook whose write stopped short treats it as failed and runs the program itself
|
||||
val line = StringBuilder()
|
||||
while (true) {
|
||||
var ended = false
|
||||
while (!ended) {
|
||||
val c = input.read()
|
||||
if (c < 0 || c == '\n'.code) break
|
||||
line.append(c.toChar())
|
||||
if (c < 0) break
|
||||
if (c == '\n'.code) ended = true else line.append(c.toChar())
|
||||
}
|
||||
line.toString() == "go"
|
||||
ended && line.toString() == "go"
|
||||
}.getOrDefault(false)
|
||||
}
|
||||
handedOver = true
|
||||
|
||||
Reference in new issue
Block a user