From 57bbdffcb4d01e613d39c423b1273e2003c3be43 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20G=C4=85tkowski?= Date: Mon, 8 Aug 2022 01:57:28 +0200 Subject: [PATCH] Fix SA1015 --- cmd/magneticod/dht/mainline/protocol.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)