mirror of
https://github.com/pion/webrtc.git
synced 2025-10-28 17:41:49 +08:00
Fix SRTP shutdown race
Add Stop() to RTCDtlsTransport and guard the shutdown of SRTP
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user