libp2p / libp2p/py-libp2p

Adding remove function to net stream

Open
#663 0 comments 0 reactions 1 assignee View on GitHub

@Sahilgill24 is already working on this.

Since Jun 9, 2025.

Dominant language
Python
Stars
624
Forks
256
Avg merge
1d 34m
Merged PRs (30d)
47

Description

Description

The go-implementation uses a remove function which notifies all the connections in a swarm that stream has been closed from both the sides and will emit the ClosedStream notification, when the stream is closed. This can now be implemented in the python version after the implementation of the Stream States.

Motivation

The remove function would help as follows :-

  • Proper handling of streams closed on both ends or reset streams and proper count of active streams in a swarm.
  • Would prevent the dead streams to be counted in the current active streams.
Current Implementation

Currently not implemented.
Reference :- go implementation

Are you planning to do it yourself in a pull request ?

Yes

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.