Skip to content
This repository has been archived by the owner on Jul 21, 2023. It is now read-only.

feat: close read and write streams #170

Merged
merged 4 commits into from
May 23, 2022
Merged

feat: close read and write streams #170

merged 4 commits into from
May 23, 2022

Conversation

achingbrain
Copy link
Member

@achingbrain achingbrain commented May 19, 2022

This also now throws an error when a write is attempted on a non existent stream. Previously we would just send the message, but this is against the mplex protocol.

Refs: #120
Supersedes: #115

This also now throws an error when a write is attempted on a non existent stream. Previously we would just send the message, but this is against the mplex protocol.

Refs: #120
Supersedes: #115
achingbrain added a commit to libp2p/js-libp2p that referenced this pull request May 19, 2022
Copy link
Member

@wemeetagain wemeetagain left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's kinda funky that close is async but abort and reset are sync (close awaits stream.source.end() but abort and reset don't)
But LGTM otherwise

@achingbrain
Copy link
Member Author

Fair point, I don't even think it needs to be async as source is a pushable and the end method on that class returns self not a promise.

@achingbrain achingbrain merged commit 3917968 into master May 23, 2022
@achingbrain achingbrain deleted the fix/close-streams branch May 23, 2022 10:27
github-actions bot pushed a commit that referenced this pull request May 23, 2022
## [1.1.0](v1.0.5...v1.1.0) (2022-05-23)

### Features

* close read and write streams ([#170](#170)) ([3917968](3917968)), closes [#120](#120) [#115](#115)
@github-actions
Copy link

🎉 This PR is included in version 1.1.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants