diff --git a/agent.go b/agent.go index e329e247..144f9c21 100644 --- a/agent.go +++ b/agent.go @@ -728,7 +728,7 @@ func (a *Agent) addCandidate(ctx context.Context, c Candidate, candidateConn net set := a.localCandidates[c.NetworkType()] for _, candidate := range set { if candidate.Equal(c) { - a.log.Debugf("Ignore duplicate candidate: %s", c.String()) + a.log.Debugf("Ignore duplicate candidate: %s", c) if err := c.close(); err != nil { a.log.Warnf("Failed to close duplicate candidate: %v", err) } @@ -886,7 +886,7 @@ func (a *Agent) findRemoteCandidate(networkType NetworkType, addr net.Addr) Cand } func (a *Agent) sendBindingRequest(m *stun.Message, local, remote Candidate) { - a.log.Tracef("Ping STUN from %s to %s", local.String(), remote.String()) + a.log.Tracef("Ping STUN from %s to %s", local, remote) a.invalidatePendingBindingRequests(time.Now()) a.pendingBindingRequests = append(a.pendingBindingRequests, bindingRequest{ @@ -1001,7 +1001,7 @@ func (a *Agent) handleInbound(m *stun.Message, local Candidate, remote net.Addr) a.selector.HandleSuccessResponse(m, local, remoteCandidate, remote) } else if m.Type.Class == stun.ClassRequest { - a.log.Tracef("Inbound STUN (Request) from %s to %s, useCandidate: %v", remote.String(), local.String(), m.Contains(stun.AttrUseCandidate)) + a.log.Tracef("Inbound STUN (Request) from %s to %s, useCandidate: %v", remote, local, m.Contains(stun.AttrUseCandidate)) if err = stunx.AssertUsername(m, a.localUfrag+":"+a.remoteUfrag); err != nil { a.log.Warnf("Discard message from (%s), %v", remote, err)