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

webrtc: add a test for establishing many connections #2801

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sukunrt
Copy link
Member

@sukunrt sukunrt commented May 17, 2024

No description provided.

@sukunrt sukunrt force-pushed the webrtc-fix branch 4 times, most recently from ad84c06 to 8fcca64 Compare May 20, 2024 17:53
@libp2p libp2p deleted a comment from github-actions bot May 20, 2024
@sukunrt sukunrt marked this pull request as ready for review May 20, 2024 19:23
@sukunrt sukunrt requested review from MarcoPolo and removed request for MarcoPolo May 20, 2024 19:23
@sukunrt sukunrt marked this pull request as draft May 20, 2024 19:24
@sukunrt sukunrt marked this pull request as ready for review May 21, 2024 16:52
@sukunrt sukunrt requested a review from MarcoPolo May 21, 2024 16:52
Comment on lines +332 to +333
pc.OnConnectionStateChange(func(_ webrtc.PeerConnectionState) {
switch pc.ConnectionState() {
Copy link
Member Author

Choose a reason for hiding this comment

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

This works fine, but the change makes it better in case there are ordering issues for the callback. The callback does need to guarantee that we can access connection state.

Copy link
Member Author

Choose a reason for hiding this comment

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

Apparently it doesn't work fine. pion/webrtc#2702 (comment)

So we do need this change.

@sukunrt sukunrt force-pushed the webrtc-fix branch 2 times, most recently from 24f7760 to 5a485d6 Compare May 21, 2024 16:57
@sukunrt sukunrt marked this pull request as draft May 21, 2024 17:42
return
}
s.Write(b[:])
s.Read(b[:]) // peer will close the connection after read
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we expect an error here then?

Copy link
Member Author

Choose a reason for hiding this comment

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

added a check.

@sukunrt sukunrt force-pushed the webrtc-fix branch 2 times, most recently from 3c3731a to 64836ad Compare June 8, 2024 11:51
@sukunrt sukunrt changed the title webrtc: add a stress test for many connections webrtc: add a test for establishing many connections Jun 8, 2024
@sukunrt sukunrt marked this pull request as ready for review June 8, 2024 12:02
@sukunrt sukunrt force-pushed the webrtc-fix branch 2 times, most recently from 22aa5d5 to a611a26 Compare June 8, 2024 12:21
@sukunrt sukunrt marked this pull request as draft June 8, 2024 12:23
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.

None yet

2 participants