Skip to content
This repository has been archived by the owner on Feb 12, 2024. It is now read-only.

fix: wip #885

Merged
merged 1 commit into from
Jun 29, 2017
Merged

fix: wip #885

merged 1 commit into from
Jun 29, 2017

Conversation

daviddias
Copy link
Member

I messed up merging #884. Fooled by the fact that Swarm prints any addr that is in Swarm.Addresses as "Listening" that are on the config. It wasn't correctly picking up the WebRTC module.

Now I found (this was a tricky one) that lodash.get messes the WebRTC Star instance.

@daviddias daviddias merged commit 26477fd into master Jun 29, 2017
@daviddias daviddias deleted the fix/webrtc-plug-in branch June 29, 2017 20:15
@daviddias daviddias removed the status/in-progress In progress label Jun 29, 2017
MicrowaveDev pushed a commit to galtproject/js-ipfs that referenced this pull request May 22, 2020
BREAKING CHANGE. Previously swarm.peers would throw an uncaught error
if any peer in the reponse could have its peerId or multiaddr validated.

This PR catches errors that occur while validating the peer info. The
returned array will contain an entry for every peer in the ipfs response.
peer-info objects that couldn't be validated, now have an `error` property
and a `rawPeerInfo` property. This at least means the count of peers in
the response will be accurate, and there the info is available to the caller.

This means that callers now have to deal with peer-info objects that may
not have a `peer or `addr` property.

Adds `nock` tests to exercice the code under different error conditions.
Doing so uncovered a bug in our legacy go-ipfs <= 0.4.4 peer info parsing,
which is also fixed. The code was trying to decapusalate the peerId from
the multiaddr, but doing so trims the peerId rather than returning it.

fixes ipfs#885

License: MIT
Signed-off-by: Oli Evans <[email protected]>
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.

1 participant