-
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
Implement DTLS restart #1846
base: master
Are you sure you want to change the base?
Implement DTLS restart #1846
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1846 +/- ##
==========================================
- Coverage 76.89% 69.98% -6.92%
==========================================
Files 87 64 -23
Lines 8937 3258 -5679
==========================================
- Hits 6872 2280 -4592
+ Misses 1647 860 -787
+ Partials 418 118 -300
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
@Antonito This is absolutely amazing work, your PRs are the best I have seen in months. Gives me the energy to get back into it :) I think we could make the test a lot simpler.
I think that gets us the coverage we need and keeps the LoC low still? Push back if I am wrong! |
So, I tried to rewrite the unit test in a simpler way, and it uncovered several problems. I'm not sure if there are caused by the DTLS restart or were already there (I'm thinking the later, for most of them).
|
b0d56c6
to
0d1e50c
Compare
I rewrote the unit test without pion/transport, and split it in two very similar tests, for debugging purpose:
Before merging, we should only keep SCTP restart is now implemented and DataChannels are re-opened, if needed. There seems to be some kind of race condition, but I really don't think it's related to the stuff this PR modifies – I think the unit tests just show an already existing problem. The webrtc/peerconnection_media_test.go Line 1329 in 0d1e50c
I think this is a consequence of the first point I was developing in my previous message (about RTP packets).
|
0d1e50c
to
a10ddec
Compare
a10ddec
to
13df7ae
Compare
bb27b83
to
2e55618
Compare
2e55618
to
ce2fd9b
Compare
Following up discussion with @davidzhao, I updated both this PR and pion/srtp#148. In order to get some progress on this, I think we should first focus on merging pion/srtp#148 – we need to figure out @Sean-Der 's concerns about As for this PR, it requires a bit more work, there are still issues with |
Thanks for picking this back up @Antonito! We'd love to collaborate on this. Will have a look in a few weeks. |
hey @Antonito, do you still want to work together to get this in? |
pion/srtp#148 is needed before being able to merge
The unit test needs pion/transport#141Fixes #1636
I'm not sure aboutif t.state != DTLSTransportStateNew && t.state != DTLSTransportStateClosed
, one other option would be to set the state toNew
before restarting, but I don't want to trigger a StateChanged event – which could be wrong.Turns out that's what libwebrtc does
Also the condition on which DTLS is restarted might be too permissive – but it doesn't seem to break any test so far.