mirror of
https://github.com/livekit/livekit.git
synced 2026-03-30 17:45:40 +00:00
fix restarting ICE log
This commit is contained in:
@@ -172,14 +172,16 @@ func (t *PCTransport) CreateAndSendOffer(options *webrtc.OfferOptions) error {
|
||||
iceRestart := options != nil && options.ICERestart
|
||||
|
||||
// if restart is requested, and we are not ready, then continue afterwards
|
||||
if iceRestart && t.pc.ICEGatheringState() == webrtc.ICEGatheringStateGathering {
|
||||
logger.Debugw("restart ICE after gathering")
|
||||
t.restartAfterGathering.Store(true)
|
||||
return nil
|
||||
if iceRestart {
|
||||
if t.pc.ICEGatheringState() == webrtc.ICEGatheringStateGathering {
|
||||
logger.Debugw("restart ICE after gathering")
|
||||
t.restartAfterGathering.Store(true)
|
||||
return nil
|
||||
}
|
||||
logger.Debugw("restarting ICE")
|
||||
}
|
||||
|
||||
state := t.negotiationState.Load().(int)
|
||||
logger.Debugw("restarting ICE")
|
||||
|
||||
// when there's an ongoing negotiation, let it finish and not disrupt its state
|
||||
if state == negotiationStateClient {
|
||||
|
||||
Reference in New Issue
Block a user