mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-17 17:33:47 +00:00
format. Add separate tick for cache cleaning
This commit is contained in:
parent
c63b036812
commit
8054d2f3a6
1 changed files with 10 additions and 7 deletions
|
|
@ -177,7 +177,10 @@ func (self *Pss) Start(srv *p2p.Server) error {
|
|||
go func() {
|
||||
for {
|
||||
tickC := time.Tick(defaultCleanInterval)
|
||||
cacheTickC := time.Tick(cacheTTL)
|
||||
select {
|
||||
case <-cacheTickC:
|
||||
self.cleanFwdCache()
|
||||
case <-tickC:
|
||||
self.cleanKeys()
|
||||
case <-self.quitC:
|
||||
|
|
|
|||
Loading…
Reference in a new issue