Skip to content
This repository has been archived by the owner on Mar 23, 2021. It is now read-only.

Network connection via libp2p sometimes fails because it connects to the wrong address #925

Closed
thomaseizinger opened this issue May 3, 2019 · 2 comments
Assignees
Labels
🐛 bug Something isn't working

Comments

@thomaseizinger
Copy link
Contributor

Note: Bug originally perceived by @D4nte.

The connection to the other node sometimes fails because we are trying to connect via an external address (if connected to VPN for example).

I believe, this has to do with the order in which we return the addresses here:

fn addresses_of_peer(&mut self, peer_id: &PeerId) -> Vec<Multiaddr> {
self.addresses()
.find_map(|(candidate, addresses)| {
if &candidate == peer_id {
Some(addresses)
} else {
None
}
})
.unwrap_or_else(Vec::new)

Needs further investigation:

  1. if this is the source of the perceived bug
  2. what the correct/expected order is
@thomaseizinger thomaseizinger added the 🐛 bug Something isn't working label May 3, 2019
@bonomat
Copy link
Member

bonomat commented May 13, 2019

@D4nte try to reproduce this please.

@D4nte D4nte added this to the Sprint 14 🚫⌨️🦍 milestone May 15, 2019
@D4nte
Copy link
Contributor

D4nte commented May 15, 2019

cargo make e2e passes on Mac OS with vpn on.

@D4nte D4nte closed this as completed May 15, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
🐛 bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants