Commit 9223622
committed
Fix but-server claude websocket events
Move reading of the child process stdout into a dedicated blocking
thread and forward lines through an unbounded tokio mpsc channel to the
async task. Replace the previous direct async BufReader lines() loop
with a blocking std::thread::spawn that calls BufReader::lines() and
sends each Ok line over tx; the async side now awaits rx.recv().
This prevents blocking the tokio runtime on stdio reads, avoids
calling blocking I/O in async context, and preserves line-by-line
delivery for downstream JSON parsing and handling.1 parent a771d39 commit 9223622
1 file changed
+13
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
608 | 608 | | |
609 | 609 | | |
610 | 610 | | |
611 | | - | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
612 | 623 | | |
613 | | - | |
| 624 | + | |
614 | 625 | | |
615 | | - | |
616 | 626 | | |
617 | 627 | | |
618 | 628 | | |
| |||
0 commit comments