Skip to content
This repository was archived by the owner on Mar 10, 2020. It is now read-only.

fix(swarm): result.Peers can be null, ensure callback is called #770

Merged
merged 1 commit into from
May 18, 2018

Conversation

alanshaw
Copy link
Contributor

@alanshaw alanshaw commented May 16, 2018

A call to swarm.peers can give back a result object that looks like { Peers: null }. This meant the callback was never called due to a else if (result.Peers) that doesn't take into account a null Peers, and no else block.

I believe this is the source of much of the "flakeyness" in the tests.

@ghost ghost assigned alanshaw May 16, 2018
@ghost ghost added the in progress label May 16, 2018
@alanshaw alanshaw requested a review from daviddias May 17, 2018 08:30
@alanshaw alanshaw changed the title fix: result.Peers can be null, ensure callback is called fix(swarm): result.Peers can be null, ensure callback is called May 17, 2018
@alanshaw alanshaw merged commit 69a831a into master May 18, 2018
@ghost ghost removed the in progress label May 18, 2018
@alanshaw alanshaw deleted the fix/swarm-peers-cb branch May 18, 2018 08:30
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