Skip to content

fix: check if existing outbound stream is open #534

Open
julienmalard wants to merge 6 commits intoChainSafe:masterfrom
julienmalard:patch-1
Open

fix: check if existing outbound stream is open #534
julienmalard wants to merge 6 commits intoChainSafe:masterfrom
julienmalard:patch-1

Conversation

@julienmalard
Copy link

This check before aborting the stream creation fixes an issue, especially common over WebRTC connections, where a previously opened stream (e.g., WS over relay) has already been closed and prevents further gossipsub messages from being passed between peers.

If I am not mistaken, this will solve libp2p/js-libp2p#2771.

@julienmalard julienmalard requested a review from a team as a code owner November 13, 2025 11:56
@julienmalard julienmalard changed the title Check if existing outbound stream is open fix: check if existing outbound stream is open Nov 13, 2025
`status` is actually a property of `OutboundStream.rawStream`
`has` returns a boolean, not the stream. Use `get` instead.
Check not only if the stream exists but also if it is open in `directConnect`.
@julienmalard
Copy link
Author

I just updated this branch...any chance for approval of the workflow @wemeetagain @nazarhussain ?

@philknows
Copy link
Member

CI build issue here for resolving @julienmalard @wemeetagain

@julienmalard
Copy link
Author

Thanks @philknows ; I'm currently away from the office but will check within a week or so.

@julienmalard
Copy link
Author

julienmalard commented Jan 9, 2026

@philknows The currently failing test does not seem to be related to the changes I effectuated (32 todo items are causing linting to fail). Could you advise please?
Thanks!

@philknows
Copy link
Member

@nazarhussain Can you take a quick look here at why pnpm lint is failing here?

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.

2 participants