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

fix: remove MPLEX_ prefix from error codes #195

Merged
merged 1 commit into from
Jul 25, 2022

Conversation

achingbrain
Copy link
Member

To allow detecting the same error condition with different stream
muxer implementations, remove the MPLEX_ prefix from the error
codes thrown by this module.

Also adds a ERR_DOUBLE_SINK code when when .sink is called
multiple times instead of only throwing ERR_SINK_ENDED when .sink
is called after a stream is closed for reading.

Refs: ChainSafe/js-libp2p-yamux#4

To allow detecting the same error condition with different stream
muxer implementations, remove the `MPLEX_` prefix from the error
codes thrown by this module.

Also adds a `ERR_DOUBLE_SINK` code when when `.sink` is called
multiple times instead of only throwing `ERR_SINK_ENDED` when `.sink`
is called after a stream is closed for reading.

Refs: ChainSafe/js-libp2p-yamux#4
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.

lgtm

@achingbrain achingbrain merged commit c6c9581 into master Jul 25, 2022
@achingbrain achingbrain deleted the fix/remove-mplex-error-prefix branch July 25, 2022 12:10
github-actions bot pushed a commit that referenced this pull request Jul 25, 2022
## [4.0.2](v4.0.1...v4.0.2) (2022-07-25)

### Bug Fixes

* remove MPLEX_ prefix from error codes ([#195](#195)) ([c6c9581](c6c9581))
@github-actions
Copy link

🎉 This PR is included in version 4.0.2 🎉

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