-
Notifications
You must be signed in to change notification settings - Fork 12
Open
Labels
reliabilityCorrectness and reliability fixesCorrectness and reliability fixes
Description
Summary
send_async() performs two separate awaited writes (JSON body, then newline). If the first succeeds but the second fails or the task is cancelled between awaits, the client receives a JSON body with no trailing newline — an incomplete NDJSON frame that breaks the parser.
Details
- The sync transport uses a single
writeln!on aBufWriter<StdoutLock>, so it doesn't have this problem. - Fix: serialize to
String, push'\n', and callwrite_allonce. Treat any write error as fatal. - Scope:
transport_async.rs::send_async()only.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
reliabilityCorrectness and reliability fixesCorrectness and reliability fixes