libp2p / libp2p/go-libp2p-pubsub
Unclosed reader in github.com/libp2p/go-libp2p-pubsub.(*PubSub).handleNewStream
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 364
- Forks
- 221
- PR merge metrics
- No merged PRs in 30d
Description
This ReaderCloser is never closed. We are seeing high memory usage on the heap from this line and I suspect it is because `r.Close()` is never called.
https://github.com/libp2p/go-libp2p-pubsub/blob/49274b0e8aecdf6cad59d768e5702ff00aa48488/comm.go#L33
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in comm.go at line 33 and inspect PubSub.handleNewStream, where the ReaderCloser is created. Ensure the reader is closed on the relevant path, then run the repository's existing tests and confirm the unclosed-reader and memory-usage concern is addressed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- networking
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 35/100