Fix nil pointer exception when load empty list and try to cast it (#3282)

This commit is contained in:
Zoltan Papp
2025-02-06 10:20:31 +01:00
committed by Viktor Liu
parent 206420c085
commit eb69f2de78
5 changed files with 38 additions and 7 deletions

View File

@@ -1,14 +1,12 @@
package ice
import (
"sync/atomic"
"github.com/pion/ice/v3"
)
type Config struct {
// StunTurn is a list of STUN and TURN URLs
StunTurn *atomic.Value // []*stun.URI
StunTurn *StunTurn // []*stun.URI
// InterfaceBlackList is a list of machine interfaces that should be filtered out by ICE Candidate gathering
// (e.g. if eth0 is in the list, host candidate of this interface won't be used)