"time"
"github.com/anacrolix/dht/v2/krpc"
+ "github.com/anacrolix/log"
"github.com/protolambda/ctxlock"
)
} else if dr.Header.Action == ActionError {
// udp://tracker.torrent.eu.org:451/announce frequently returns "Connection ID
// missmatch.\x00"
- err = ErrorResponse{Message: string(dr.Body)}
+ stringBody := string(dr.Body)
+ err = ErrorResponse{Message: stringBody}
+ if stringBody == ConnectionIdMissmatchNul {
+ err = log.WithLevel(log.Debug, err)
+ }
// Force a reconnection. Probably any error is worth doing this for, but the one we're
// specifically interested in is ConnectionIdMissmatchNul.
cl.connIdIssued = time.Time{}