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

fix: ensure dials always use the latest PeerInfo from the PeerBook #312

Merged
merged 3 commits into from
Mar 21, 2019

Conversation

jacobheun
Copy link
Contributor

@jacobheun jacobheun commented Mar 21, 2019

This fixes an issue where if dial is called with a new instance of PeerInfo, if it is the first dial to that peer, the queue was forever associated with that instance. This is currently the case when Circuit checks the HOP status of a potential relay. This ensures that whenever we dial, we are updating the peer book and using the latest PeerInfo in that dial request.

Fixes the issues here https:/libp2p/js-libp2p/pull/336/checks?check_run_id=82068526, passing build at https://travis-ci.com/libp2p/js-libp2p/builds/105269120

This fixes an issue where if dial is called with a new instance
of PeerInfo, if it is the first dial to that peer, the queue was
forever associated with that instance. This is currently the case
when Circuit checks the HOP status of a potential relay. This ensures
that whenever we dial, we are updating the peer book and using the
latest PeerInfo in that dial request.
@ghost ghost assigned jacobheun Mar 21, 2019
@ghost ghost added the in progress label Mar 21, 2019
src/dialer/queue.js Show resolved Hide resolved
@jacobheun jacobheun merged commit 16f2bc3 into master Mar 21, 2019
@jacobheun jacobheun deleted the fix/peerinfo branch March 21, 2019 12:11
@ghost ghost removed the in progress label Mar 21, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants