2
0
mirror of synced 2025-02-24 14:48:27 +00:00

dht: Count announce errors, don't log them

This commit is contained in:
Matt Joiner 2015-08-04 01:20:44 +10:00
parent bbe58bbd73
commit 5a73f73d97
2 changed files with 4 additions and 1 deletions

View File

@ -978,7 +978,9 @@ func (s *Server) announcePeer(node dHTAddr, infoHash string, port int, token str
"token": token,
}, func(m Msg) {
if err := m.Error(); err != nil {
logonce.Stderr.Printf("announce_peer response: %s", err)
announceErrors.Add(1)
// log.Print(token)
// logonce.Stderr.Printf("announce_peer response: %s", err)
return
}
s.numConfirmedAnnounces++

View File

@ -9,4 +9,5 @@ var (
readBlocked = expvar.NewInt("dhtReadBlocked")
readUnmarshalError = expvar.NewInt("dhtReadUnmarshalError")
readQuery = expvar.NewInt("dhtReadQuery")
announceErrors = expvar.NewInt("dhtAnnounceErrors")
)