-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Gracefully close connecting channels #2991
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2991 +/- ##
==========================================
- Coverage 77.93% 77.89% -0.04%
==========================================
Files 89 89
Lines 10546 10550 +4
==========================================
- Hits 8219 8218 -1
- Misses 1838 1841 +3
- Partials 489 491 +2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
4e15fac
to
7870657
Compare
7870657
to
d3b26cb
Compare
d3b26cb
to
f647518
Compare
datachannel.go
Outdated
d.mu.Unlock() | ||
dc.Close() // nolint:errcheck,gosec |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think a comment is required here, since it's not immediately obvious why that is needed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am fixing and merging that right now actually! I am going to log the error.
Also going to get involved with RTX, sorry I have been busy.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No worries, I'm going to implement TWCC, and come back to RTX when you guys are ready.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I used to log the error but I removed it in another commit my bad :)
f647518
to
032e3eb
Compare
Fixes an issue where calling dataChannel.Close on 'connecting' state channels didn't work as expected. When handling the `OnOpen` event detect if the user has requested close. Fixes #2659
032e3eb
to
275ed7b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Amazing work @joeturki congrats on the first merge 🥳
Description
This PR fixes an issue where calling
dataChannel.Close
on 'connecting' state channels didn't work as expected; It adds the ability to reject data channels directly from theOnDataConnection
handler.Reference issue
Fixes #2659