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

@@ -13,7 +13,6 @@ import (
"sort"
"strings"
"sync"
"sync/atomic"
"time"
"github.com/hashicorp/go-multierror"
@@ -147,7 +146,7 @@ type Engine struct {
STUNs []*stun.URI
// TURNs is a list of STUN servers used by ICE
TURNs []*stun.URI
stunTurn atomic.Value
stunTurn icemaker.StunTurn
clientCtx context.Context
clientCancel context.CancelFunc