Skip to content

Conversation

@benoitc
Copy link
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

change owner process for async request to stream_to value

2 participants