Skip to content

fix: bytestream reads buffered data#3378

Merged
tabcat merged 2 commits intolibp2p:mainfrom
tabcat:bytestream
Feb 25, 2026
Merged

fix: bytestream reads buffered data#3378
tabcat merged 2 commits intolibp2p:mainfrom
tabcat:bytestream

Conversation

@tabcat
Copy link
Copy Markdown
Member

@tabcat tabcat commented Feb 19, 2026

Title

fix: bytestream reads buffered data

Description

bytestream.read checks the bytestream's readBuffer before returning null.
before, bytestream.read would only check if the stream's write side was closed and the stream's write side buffer was empty to return null.

Notes & open questions

Change checklist

  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation if necessary (this includes comments as well)
  • I have added tests that prove my fix is effective or that my feature works

@tabcat tabcat marked this pull request as ready for review February 20, 2026 06:31
@tabcat tabcat requested a review from a team as a code owner February 20, 2026 06:31
@tabcat tabcat requested a review from dozyio February 22, 2026 10:46
@tabcat tabcat merged commit 30b53a9 into libp2p:main Feb 25, 2026
60 of 63 checks passed
@github-actions github-actions Bot mentioned this pull request Feb 25, 2026
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