mirror of
https://github.com/netbirdio/ice-old.git
synced 2026-05-22 17:08:24 -07:00
Use distinct message for CandidatePair unset
Easier when debugging to tell when setting (or unsetting)
This commit is contained in:
committed by
Sean DuBois
parent
72b5271d4c
commit
b418d293ee
@@ -568,16 +568,16 @@ func (a *Agent) updateConnectionState(newState ConnectionState) {
|
||||
}
|
||||
|
||||
func (a *Agent) setSelectedPair(p *CandidatePair) {
|
||||
a.log.Tracef("Set selected candidate pair: %s", p)
|
||||
|
||||
if p == nil {
|
||||
var nilPair *CandidatePair
|
||||
a.selectedPair.Store(nilPair)
|
||||
a.log.Tracef("Unset selected candidate pair")
|
||||
return
|
||||
}
|
||||
|
||||
p.nominated = true
|
||||
a.selectedPair.Store(p)
|
||||
a.log.Tracef("Set selected candidate pair: %s", p)
|
||||
|
||||
a.updateConnectionState(ConnectionStateConnected)
|
||||
|
||||
|
||||
@@ -183,7 +183,7 @@ func (m *UniversalUDPMuxDefault) GetXORMappedAddr(serverAddr net.Addr, deadline
|
||||
// or wait for already sent request to complete
|
||||
waitAddrReceived, err := m.sendStun(serverAddr)
|
||||
if err != nil {
|
||||
return nil, errSendSTUNPacket
|
||||
return nil, fmt.Errorf("%w: %s", errSendSTUNPacket, err)
|
||||
}
|
||||
|
||||
// block until response was handled by the connWorker routine and XORMappedAddress was updated
|
||||
|
||||
Reference in New Issue
Block a user