mirror of
https://github.com/netbirdio/ice.git
synced 2026-05-22 17:10:58 -07:00
Change working for logging errors
This commit is contained in:
@@ -439,7 +439,7 @@ func (a *Agent) connectivityChecks() {
|
||||
|
||||
a.selector.ContactCandidates()
|
||||
}); err != nil {
|
||||
a.log.Warnf("taskLoop failed: %v", err)
|
||||
a.log.Warnf("Failed to start connectivity checks: %v", err)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -525,7 +525,7 @@ func (a *Agent) pingAllCandidates() {
|
||||
a.log.Trace("pinging all candidates")
|
||||
|
||||
if len(a.checklist) == 0 {
|
||||
a.log.Warn("pingAllCandidates called with no candidate pairs. Connection is not possible yet.")
|
||||
a.log.Warn("Failed to ping without candidate pairs. Connection is not possible yet.")
|
||||
}
|
||||
|
||||
for _, p := range a.checklist {
|
||||
@@ -878,7 +878,7 @@ func (a *Agent) deleteAllCandidates() {
|
||||
func (a *Agent) findRemoteCandidate(networkType NetworkType, addr net.Addr) Candidate {
|
||||
ip, port, _, ok := parseAddr(addr)
|
||||
if !ok {
|
||||
a.log.Warnf("Error parsing addr: %s", addr)
|
||||
a.log.Warnf("Failed to parse address: %s", addr)
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -910,7 +910,7 @@ func (a *Agent) sendBindingSuccess(m *stun.Message, local, remote Candidate) {
|
||||
|
||||
ip, port, _, ok := parseAddr(base.addr())
|
||||
if !ok {
|
||||
a.log.Warnf("Error parsing addr: %s", base.addr())
|
||||
a.log.Warnf("Failed to parse address: %s", base.addr())
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
+3
-3
@@ -48,7 +48,7 @@ func (a *Agent) GetCandidatePairsStats() []CandidatePairStats {
|
||||
res = result
|
||||
})
|
||||
if err != nil {
|
||||
a.log.Errorf("error getting candidate pairs stats %v", err)
|
||||
a.log.Errorf("Failed to get candidate pairs stats: %v", err)
|
||||
return []CandidatePairStats{}
|
||||
}
|
||||
return res
|
||||
@@ -85,7 +85,7 @@ func (a *Agent) GetLocalCandidatesStats() []CandidateStats {
|
||||
res = result
|
||||
})
|
||||
if err != nil {
|
||||
a.log.Errorf("error getting candidate pairs stats %v", err)
|
||||
a.log.Errorf("Failed to get candidate pair stats: %v", err)
|
||||
return []CandidateStats{}
|
||||
}
|
||||
return res
|
||||
@@ -115,7 +115,7 @@ func (a *Agent) GetRemoteCandidatesStats() []CandidateStats {
|
||||
res = result
|
||||
})
|
||||
if err != nil {
|
||||
a.log.Errorf("error getting candidate pairs stats %v", err)
|
||||
a.log.Errorf("Failed to get candidate pair stats: %v", err)
|
||||
return []CandidateStats{}
|
||||
}
|
||||
return res
|
||||
|
||||
@@ -127,7 +127,7 @@ func (a *Agent) gatherCandidatesLocal(ctx context.Context, networkTypes []Networ
|
||||
// When UDPMux is enabled, skip other UDP candidates
|
||||
if a.udpMux != nil {
|
||||
if err := a.gatherCandidatesLocalUDPMux(ctx); err != nil {
|
||||
a.log.Warnf("could not create host candidate for UDPMux: %s", err)
|
||||
a.log.Warnf("Failed to create host candidate for UDPMux: %s", err)
|
||||
}
|
||||
delete(networks, udp)
|
||||
}
|
||||
@@ -175,14 +175,14 @@ func (a *Agent) gatherCandidatesLocal(ctx context.Context, networkTypes []Networ
|
||||
a.log.Debugf("GetAllConns by ufrag: %s", a.localUfrag)
|
||||
muxConns, err = multi.GetAllConns(a.localUfrag, mappedIP.To4() == nil, ip)
|
||||
if err != nil {
|
||||
a.log.Warnf("error getting all TCP connections by ufrag: %s %s %s", network, ip, a.localUfrag)
|
||||
a.log.Warnf("Failed to get all TCP connections by ufrag: %s %s %s", network, ip, a.localUfrag)
|
||||
continue
|
||||
}
|
||||
} else {
|
||||
a.log.Debugf("GetConn by ufrag: %s", a.localUfrag)
|
||||
conn, err := a.tcpMux.GetConnByUfrag(a.localUfrag, mappedIP.To4() == nil, ip)
|
||||
if err != nil {
|
||||
a.log.Warnf("error getting TCP connections by ufrag: %s %s %s", network, ip, a.localUfrag)
|
||||
a.log.Warnf("Failed to get TCP connections by ufrag: %s %s %s", network, ip, a.localUfrag)
|
||||
continue
|
||||
}
|
||||
muxConns = []net.PacketConn{conn}
|
||||
@@ -206,7 +206,7 @@ func (a *Agent) gatherCandidatesLocal(ctx context.Context, networkTypes []Networ
|
||||
case udp:
|
||||
conn, err := listenUDPInPortRange(a.net, a.log, int(a.portMax), int(a.portMin), network, &net.UDPAddr{IP: ip, Port: 0})
|
||||
if err != nil {
|
||||
a.log.Warnf("could not listen %s %s", network, ip)
|
||||
a.log.Warnf("Failed to listen %s %s", network, ip)
|
||||
continue
|
||||
}
|
||||
|
||||
@@ -405,13 +405,13 @@ func (a *Agent) gatherCandidatesSrflxUDPMux(ctx context.Context, urls []*URL, ne
|
||||
|
||||
xorAddr, err := a.udpMuxSrflx.GetXORMappedAddr(serverAddr, stunGatherTimeout)
|
||||
if err != nil {
|
||||
a.log.Warnf("could not get server reflexive address %s %s: %v", network, url, err)
|
||||
a.log.Warnf("Failed get server reflexive address %s %s: %v", network, url, err)
|
||||
return
|
||||
}
|
||||
|
||||
conn, err := a.udpMuxSrflx.GetConnForURL(a.localUfrag, url.String(), localAddr)
|
||||
if err != nil {
|
||||
a.log.Warnf("could not find connection in UDPMuxSrflx %s %s: %v", network, url, err)
|
||||
a.log.Warnf("Failed to find connection in UDPMuxSrflx %s %s: %v", network, url, err)
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user