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

Close PeerConnection on DTLS CloseNotify #2555

Merged
merged 1 commit into from
Sep 5, 2023
Merged

Close PeerConnection on DTLS CloseNotify #2555

merged 1 commit into from
Sep 5, 2023

Conversation

Sean-Der
Copy link
Member

@Sean-Der Sean-Der commented Sep 4, 2023

Resolves #1767
Resolves pion/dtls#151

@codecov
Copy link

codecov bot commented Sep 4, 2023

Codecov Report

Patch coverage is 71.42% of modified lines.

Files Changed Coverage
peerconnection.go 57.14%
internal/mux/endpoint.go 83.33%
dtlstransport.go 100.00%

📢 Thoughts on this report? Let us know!.

@Sean-Der
Copy link
Member Author

Sean-Der commented Sep 4, 2023

Would love your take @boks1971 @cnderrauber

Everyone should see much faster hang ups and should more closely match browser behavior. I hope I am not making any assumptions though.

Copy link
Member

@cnderrauber cnderrauber left a comment

Choose a reason for hiding this comment

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

Looks good!

Copy link
Contributor

@boks1971 boks1971 left a comment

Choose a reason for hiding this comment

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

@Sean-Der This is great. LGTM!

One curiosity question: I could not quite understand the test you added, i. e. how does it trigger the new path? It is basically the new path is going to be triggered pretty much most of the time? If yes, is there is a need for a new test (guessing existing tests would cover it).

@Sean-Der Sean-Der merged commit 60eea43 into master Sep 5, 2023
19 checks passed
@Sean-Der Sean-Der deleted the issue-1767 branch September 5, 2023 08:52
@Sean-Der
Copy link
Member Author

Sean-Der commented Sep 5, 2023

@boks1971 The test doesn’t explicitly close both PeerConnections. It then uses the ‘leaked threads checker’ so it can’t complete until both close.

I bet the new path is happening in most tests! As soon as you close a PeerConnection it sends the Close. It’s a race between that and closing both connections in each test :)

@boks1971
Copy link
Contributor

boks1971 commented Sep 5, 2023

@boks1971 The test doesn’t explicitly close both PeerConnections. It then uses the ‘leaked threads checker’ so it can’t complete until both close.

I bet the new path is happening in most tests! As soon as you close a PeerConnection it sends the Close. It’s a race between that and closing both connections in each test :)

aah, got it, thank you Sean.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants