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

fix: dht find providers stream #10

Merged
merged 1 commit into from
Mar 29, 2019
Merged

Conversation

vasco-santos
Copy link
Member

@vasco-santos vasco-santos commented Mar 26, 2019

In the context of DHT interop tests libp2p/interop#7 for content routing, I hit a case that was not caught here. However, in the interop repo the findProviders is used exactly as we do here in the tests.

Basically, as we are still working with the callbacks version of libp2p core, in the findProviders logic in the daemon, we receive all the providers from core and return them as a stream (however, we already have all the data). This way, we were waiting for the first message to arrive (BEGIN MESSAGE) and then for await for the remaining ones. As we already sent all the messages in the beginning, it seems that the remaining ones do not get into the for await loop.

@vasco-santos vasco-santos merged commit 8293a1e into master Mar 29, 2019
@vasco-santos vasco-santos deleted the fix/dht-find-providers-stream branch March 29, 2019 09:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants