mirror of
https://github.com/netbirdio/ice.git
synced 2026-05-22 17:10:58 -07:00
Remove pessimistic String calls for low level logs
This commit is contained in:
+5
-6
@@ -59,7 +59,7 @@ func (s *controllingSelector) ContactCandidates() {
|
||||
default:
|
||||
p := s.agent.getBestValidCandidatePair()
|
||||
if p != nil && s.isNominatable(p.Local) && s.isNominatable(p.Remote) {
|
||||
s.log.Tracef("Nominatable pair found, nominating (%s, %s)", p.Local.String(), p.Remote.String())
|
||||
s.log.Tracef("Nominatable pair found, nominating (%s, %s)", p.Local, p.Remote)
|
||||
p.nominated = true
|
||||
s.nominatedPair = p
|
||||
s.nominatePair(p)
|
||||
@@ -87,7 +87,7 @@ func (s *controllingSelector) nominatePair(pair *CandidatePair) {
|
||||
return
|
||||
}
|
||||
|
||||
s.log.Tracef("Ping STUN (nominate candidate pair) from %s to %s", pair.Local.String(), pair.Remote.String())
|
||||
s.log.Tracef("Ping STUN (nominate candidate pair) from %s to %s", pair.Local, pair.Remote)
|
||||
s.agent.sendBindingRequest(msg, pair.Local, pair.Remote)
|
||||
}
|
||||
|
||||
@@ -106,8 +106,7 @@ func (s *controllingSelector) HandleBindingRequest(m *stun.Message, local, remot
|
||||
if bestPair == nil {
|
||||
s.log.Tracef("No best pair available")
|
||||
} else if bestPair.equal(p) && s.isNominatable(p.Local) && s.isNominatable(p.Remote) {
|
||||
s.log.Tracef("The candidate (%s, %s) is the best candidate available, marking it as nominated",
|
||||
p.Local.String(), p.Remote.String())
|
||||
s.log.Tracef("The candidate (%s, %s) is the best candidate available, marking it as nominated", p.Local, p.Remote)
|
||||
s.nominatedPair = p
|
||||
s.nominatePair(p)
|
||||
}
|
||||
@@ -130,7 +129,7 @@ func (s *controllingSelector) HandleSuccessResponse(m *stun.Message, local, remo
|
||||
return
|
||||
}
|
||||
|
||||
s.log.Tracef("Inbound STUN (SuccessResponse) from %s to %s", remote.String(), local.String())
|
||||
s.log.Tracef("Inbound STUN (SuccessResponse) from %s to %s", remote, local)
|
||||
p := s.agent.findPair(local, remote)
|
||||
|
||||
if p == nil {
|
||||
@@ -221,7 +220,7 @@ func (s *controlledSelector) HandleSuccessResponse(m *stun.Message, local, remot
|
||||
return
|
||||
}
|
||||
|
||||
s.log.Tracef("Inbound STUN (SuccessResponse) from %s to %s", remote.String(), local.String())
|
||||
s.log.Tracef("Inbound STUN (SuccessResponse) from %s to %s", remote, local)
|
||||
|
||||
p := s.agent.findPair(local, remote)
|
||||
if p == nil {
|
||||
|
||||
+1
-1
@@ -343,7 +343,7 @@ func (m *UDPMuxDefault) connWorker() {
|
||||
}
|
||||
|
||||
if destinationConn == nil {
|
||||
m.params.Logger.Tracef("Dropping packet from %s, addr: %s", udpAddr.addr.String(), addr.String())
|
||||
m.params.Logger.Tracef("Dropping packet from %s, addr: %s", udpAddr.addr, addr)
|
||||
continue
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user