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

go/p2p/peermgmt: Find peers and connect only when needed #5480

Merged
merged 1 commit into from
Nov 28, 2023

Conversation

peternose
Copy link
Contributor

Should fix the following error that occurs when discovery is started and stopped immediately if there are enough peers.

Nov 27 22:04:11 opf-sgx-a oasis-node[461305]: {"caller":"client.go:466","err":"failed to open stream: failed to dial: context canceled","level":"debug","method":"discover","module":"p2p/rpc/client","msg":"failed to call method","peer_id":"12D3KooWBpWUqSb8u8AQewueVMmfK2E81pA76xd8srHyK5cLo18A","protocol":"/oasis/bootstrap/1.0.0","ts":"2023-11-27T22:04:11.485476292Z"}

If we are already connected to a sufficient number of peers
for a given topic or protocol, there's no need to retrieve
additional peers from the registry or the seed node.
@peternose peternose marked this pull request as ready for review November 28, 2023 00:40
@peternose peternose enabled auto-merge November 28, 2023 00:40
@peternose peternose merged commit 5da85f3 into master Nov 28, 2023
@peternose peternose deleted the peternose/bugfix/fetch-peers-when-needed branch November 28, 2023 09:31
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