fix race condition in tests (#894)

This commit is contained in:
Alessandro Ros
2025-09-16 11:18:47 +02:00
committed by GitHub
parent 8c7e4320bc
commit f8649f6cf1

View File

@@ -707,7 +707,7 @@ func TestServerPlay(t *testing.T) {
ctx.Session.OnPacketRTCPAny(func(medi *description.Media, pkt rtcp.Packet) {
// ignore multicast loopback
if ca.secure == "unsecure" && ca.transport == "multicast" && atomic.AddUint64(&counter, 1) <= 1 {
if ca.secure == "unsecure" && ca.transport == "multicast" && atomic.AddUint64(&counter, 1) > 1 {
return
}