libp2p / libp2p/go-libp2p

swarm: ensure that transports are not used after calling Close

Open
#1,545 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

kind/enhancement
Dominant language
Go
Stars
6.9k
Forks
1.3k
Avg merge
13d 21h
Merged PRs (30d)
1

Description

In https://github.com/libp2p/go-libp2p-swarm/pull/227, it's possible for a dial to be initiated on a transport after calling `Close` while shutting down. This _usually_ won't be an issue, but it would be nice to make this situation impossible.

Contributor guide

No contributing guide indexed for this repository

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.

Research direction

Start by reviewing the shutdown and dialing behavior discussed in pull request #227, focusing on how transports are selected after Close is called. Trace the interaction between Close and an in-progress dial, then verify that no transport is used after shutdown begins, including during concurrent shutdown and dialing.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
networking
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.