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

Merged
merged 3 commits into from
Jun 12, 2024
Merged

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
@sukunrt sukunrt force-pushed the webrtc-fix branch 5 times, most recently from 8ca8216 to fdb80f5 Compare June 9, 2024 06:58
@sukunrt sukunrt force-pushed the webrtc-fix branch 11 times, most recently from 5649cab to e529aa9 Compare June 11, 2024 10:01
@sukunrt sukunrt marked this pull request as ready for review June 11, 2024 10:03
@sukunrt sukunrt force-pushed the webrtc-fix branch 3 times, most recently from 2ade25d to e30aab2 Compare June 11, 2024 10:48
@sukunrt sukunrt merged commit 6cebdd8 into master Jun 12, 2024
11 checks passed
sukunrt added a commit that referenced this pull request Jun 12, 2024
Update pion/ice to include the fix for out of order 
ConnectionState update callbacks
sukunrt added a commit that referenced this pull request Jun 12, 2024
Update pion/ice to include the fix for out of order 
ConnectionState update callbacks
MarcoPolo added a commit that referenced this pull request Jun 12, 2024
* identify: Don't filter addr if remote is neither public nor private (#2820)

Updates the filterAddrs logic to no-op if the address is neither public nor private.

This fixes an issue in mocknet that assigns each node an address in the IPv6 discard prefix space. That doesn't interact well with this logic in identify.

The issue mocknet hits is that it filters out all received listen addresses and then doesn't remember any address for the peer.

* identify: fix bug in observed address handling (#2825)

* identify: add test for observed address handling (#2828)

This modifies TestObservedAddrManager to verify the fix in #2825

* libp2phttp: workaround for ResponseWriter's CloseNotifier (#2821)

* libp2phttp: workaround for CloseNotifier

* Add lintignore

* circuitv2: improve voucher validation (#2826)

* webrtc: fix ufrag prefix for dialing (#2832)

* webrtc: add a test for establishing many connections (#2801)

Update pion/ice to include the fix for out of order 
ConnectionState update callbacks

* release v0.35.1

---------

Co-authored-by: Marco Munizaga <git@marcopolo.io>
Co-authored-by: Ivan Shvedunov <ivan4th@users.noreply.github.com>
MarcoPolo pushed a commit that referenced this pull request Jun 13, 2024
Update pion/ice to include the fix for out of order 
ConnectionState update callbacks
MarcoPolo pushed a commit that referenced this pull request Jun 13, 2024
Update pion/ice to include the fix for out of order 
ConnectionState update callbacks
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