Fix SA1015

This commit is contained in:
Michał Gątkowski 2022-08-08 01:57:28 +02:00
parent 975df8a010
commit 57bbdffcb4

View File

@ -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)