fix: use correct ticker for all peers ping (#1214)

This commit is contained in:
Prem Chaitanya Prathi 2024-09-04 19:14:17 +05:30 committed by GitHub
parent 99d2477035
commit 3066ff10b1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -59,7 +59,7 @@ func (w *WakuNode) startKeepAlive(ctx context.Context, randomPeersPingDuration t
if allPeersPingDuration != 0 { if allPeersPingDuration != 0 {
allPeersTicker := time.NewTicker(allPeersPingDuration) allPeersTicker := time.NewTicker(allPeersPingDuration)
defer allPeersTicker.Stop() defer allPeersTicker.Stop()
randomPeersTickerC = allPeersTicker.C allPeersTickerC = allPeersTicker.C
} }
lastTimeExecuted := w.timesource.Now() lastTimeExecuted := w.timesource.Now()