Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unsure about Connecting behaviour #105

Closed
whyrusleeping opened this issue Sep 5, 2016 · 2 comments
Closed

Unsure about Connecting behaviour #105

whyrusleeping opened this issue Sep 5, 2016 · 2 comments
Labels
help wanted Seeking public contribution on this issue

Comments

@whyrusleeping
Copy link
Contributor

I'm making this issue as a note to go investigate and test what happens in the following situation:

  • the node is not connected to peer P at the time we start this
  • ipfs routine A calls host.Connect(C1, P)
  • ipfs routine B calls host.Connect(C2, P)
  • ipfs routine A gets cancelled, so C1 gets cancelled.

does routine B error out? or does it continue trying to connect to the peer?

@whyrusleeping whyrusleeping added the help wanted Seeking public contribution on this issue label Sep 14, 2016
@ghost ghost added status/deferred Conscious decision to pause or backlog and removed status/deferred Conscious decision to pause or backlog labels Nov 12, 2016
@daviddias
Copy link
Member

Ideally, the switch should keep a ref count for the amount of processes dialling to a node and only stop dialing if all of them cancel out. This is something that needs to be improved in js-libp2p as well, part of the convertion of libp2p-switch to a state machine.

@raulk
Copy link
Member

raulk commented Apr 8, 2020

Hello, libp2p devs from 2016/7! Just dug up this old issue :D libp2p 2020 has dial deduplication at the swarm level: https://github.com/libp2p/go-libp2p-swarm/blob/master/dial_sync.go. So goroutine B from the OP would wait for A to complete, in success or error, and would get the same result as A when that happens.

@raulk raulk closed this as completed Apr 8, 2020
marten-seemann pushed a commit that referenced this issue Apr 21, 2022
Fix networking related test failures
marten-seemann added a commit that referenced this issue Apr 27, 2022
migrate to standard Go tests, stop using Ginkgo
marten-seemann pushed a commit that referenced this issue Aug 17, 2022
#105)

* event: Add autonat events (#25)

* add events for identify (#26)

* implement caching for rsaKey.Bytes()

* store marshalled protobuf in cache for RsaPublicKey.Bytes()

* fix(crypto): fix build when openssl is enabled

* add godocs to routability events.

Co-authored-by: Łukasz Magiera <magik6k@users.noreply.github.com>
Co-authored-by: Whyrusleeping <why@ipfs.io>
Co-authored-by: Adin Schmahmann <adin.schmahmann@gmail.com>
Co-authored-by: Steven Allen <steven@stebalien.com>
@MarcoPolo MarcoPolo mentioned this issue Jul 14, 2023
29 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Seeking public contribution on this issue
Projects
None yet
Development

No branches or pull requests

3 participants