diff --git a/cmd/magneticod/dht/mainline/protocol.go b/cmd/magneticod/dht/mainline/protocol.go index e2371ce..4a5eba3 100644 --- a/cmd/magneticod/dht/mainline/protocol.go +++ b/cmd/magneticod/dht/mainline/protocol.go @@ -284,7 +284,7 @@ func (p *Protocol) VerifyToken(address net.IP, token []byte) bool { } func (p *Protocol) updateTokenSecret() { - for range time.Tick(10 * time.Minute) { + for range time.NewTicker(10 * time.Minute).C { p.tokenLock.Lock() copy(p.previousTokenSecret, p.currentTokenSecret) _, err := rand.Read(p.currentTokenSecret)