-
Notifications
You must be signed in to change notification settings - Fork 489
Closed
Labels
P2Medium: Good to have, but can wait until someone steps upMedium: Good to have, but can wait until someone steps upexp/noviceSomeone with a little familiarity can pick upSomeone with a little familiarity can pick uphelp wantedSeeking public contribution on this issueSeeking public contribution on this issuestatus/readyReady to be workedReady to be worked
Description
In peer-base each peer keeps connections open to the peers in its Dias set. The Dias set membership changes as peers come online and go offline.
For example:
- Peer A has a Dias set that includes Peer B
- Membership changes such that Peer A's Dias set no longer includes Peer B
- Peer A should disconnect its outbound connection to peer B
- However if Peer B's Dias set includes Peer A, then that connection should be maintained
So from Peer A's perspective, it only wants to disconnect the outbound connection, leaving any inbound connection intact.
Later, when Peer A shuts down, it wants to disconnect both inbound and outbound connections.
Note that the peer:connect
event doesn't indicate if a connection is inbound or outbound, so it's not possible for peer base to keep track of inbound vs outbound connections, and in any case it would simplify the code a lot if we could rely on libp2p to do that instead.
pgte
Metadata
Metadata
Assignees
Labels
P2Medium: Good to have, but can wait until someone steps upMedium: Good to have, but can wait until someone steps upexp/noviceSomeone with a little familiarity can pick upSomeone with a little familiarity can pick uphelp wantedSeeking public contribution on this issueSeeking public contribution on this issuestatus/readyReady to be workedReady to be worked