Skip to content

Simplify receive() implementation for transports #78

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 18, 2025

Conversation

mattt
Copy link
Contributor

@mattt mattt commented Apr 16, 2025

The built-in transports currently implement the receive() method by creating a new AsyncThrowingStream that wraps an underlying messageStream. This is unnecessary since messageStream is already an AsyncThrowingStream that we can return directly.

This PR makes this change.

In the case of StdioTransport, this also changes the underlying message stream from AsyncStream to AsyncThrowingStream.

@mattt mattt merged commit 29aa74d into main Apr 18, 2025
4 checks passed
@mattt mattt deleted the mattt/simplify-transport-receive branch April 18, 2025 09:37
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.

1 participant