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

examples: call NewStream from only one side #2677

Merged
merged 3 commits into from
Dec 29, 2023

Conversation

Halimao
Copy link
Contributor

@Halimao Halimao commented Dec 27, 2023

Close #2418

Add a simply logic(by compare peer id) to avoid call NewStream from both side.


Screenshots

image

image

image

Copy link
Member

@sukunrt sukunrt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @Halimao 🎉

examples/chat-with-mdns/main.go Outdated Show resolved Hide resolved
examples/chat-with-mdns/main.go Outdated Show resolved Hide resolved
Halimao and others added 2 commits December 28, 2023 11:13
Co-authored-by: Sukun <sukunrt@gmail.com>
Co-authored-by: Sukun <sukunrt@gmail.com>
@sukunrt sukunrt changed the title refactor: call NewStream from only one side examples: call NewStream from only one side Dec 28, 2023
@Halimao
Copy link
Contributor Author

Halimao commented Dec 28, 2023

@sukunrt Hi sir, these failed ci look like not relevant to this pr, shall I care about it?

@sukunrt
Copy link
Member

sukunrt commented Dec 29, 2023

This is fine. Also please call me sukun 😅

@sukunrt sukunrt merged commit 43be145 into libp2p:master Dec 29, 2023
9 of 10 checks passed
@Halimao Halimao deleted the fix/chat-with-mdns branch December 29, 2023 04:05
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.

examples: chat-with-mdns example should open only 1 stream per peer
2 participants