Fix SRTP shutdown race

Add Stop() to RTCDtlsTransport and guard the shutdown of SRTP
This commit is contained in:
Sean DuBois
2019-01-31 01:19:26 -08:00
parent e88821b6b7
commit 88b495c7f5
5 changed files with 64 additions and 32 deletions

View File

@@ -37,13 +37,13 @@ func TestRTCPeerConnection_Media_Sample(t *testing.T) {
go func() {
for {
time.Sleep(time.Millisecond * 100)
if routineErr := pcAnswer.SendRTCP(&rtcp.PictureLossIndication{SenderSSRC: track.Ssrc, MediaSSRC: track.Ssrc}); routineErr != nil {
if routineErr := pcAnswer.SendRTCP(&rtcp.RapidResynchronizationRequest{SenderSSRC: track.Ssrc, MediaSSRC: track.Ssrc}); routineErr != nil {
awaitRTCPRecieverSend <- routineErr
return
}
select {
case <-awaitRTCPRecieverRecv:
case <-awaitRTCPSenderRecv:
close(awaitRTCPRecieverSend)
return
default: