Skip to content

fix: use stream_to as owner for async requests (#646)#816

Merged
benoitc merged 1 commit intomasterfrom
fix/646-stream-to-owner
Jan 20, 2026
Merged

fix: use stream_to as owner for async requests (#646)#816
benoitc merged 1 commit intomasterfrom
fix/646-stream-to-owner

Conversation

@benoitc
Copy link
Copy Markdown
Owner

@benoitc benoitc commented Jan 20, 2026

Summary

  • When making async requests with a stream_to option, the connection owner is now set to the stream_to process instead of the caller
  • This ensures the connection lifecycle is tied to the actual message recipient (fixes change owner process for async request to stream_to value #646)
  • If stream_to dies, the connection will be properly terminated
  • If the original caller dies but stream_to is still alive, the connection continues to work
  • Backward compatible: when stream_to equals the caller, behavior is unchanged
When making async requests with a stream_to option, the connection owner
is now set to the stream_to process instead of the caller. This ensures
the connection lifecycle is tied to the actual message recipient.

- If stream_to dies, the connection will be properly terminated
- If the original caller dies but stream_to is still alive, the
  connection continues to work
- Backward compatible: when stream_to equals the caller, behavior
  is unchanged

The ownership change happens atomically inside the connection process
when starting the async request, avoiding any race conditions.
@benoitc benoitc merged commit 9a18132 into master Jan 20, 2026
8 of 10 checks passed
@benoitc benoitc deleted the fix/646-stream-to-owner branch January 20, 2026 17:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant