eth/filters/api : Add missing calls of ticket stop

This commit is contained in:
ucwong 2020-04-02 09:25:45 +00:00
parent f15849cf00
commit 6863f5cb1d

View file

@ -78,6 +78,7 @@ func NewPublicFilterAPI(backend Backend, lightMode bool) *PublicFilterAPI {
// Tt is started when the api is created. // Tt is started when the api is created.
func (api *PublicFilterAPI) timeoutLoop() { func (api *PublicFilterAPI) timeoutLoop() {
ticker := time.NewTicker(5 * time.Minute) ticker := time.NewTicker(5 * time.Minute)
defer ticker.Stop()
for { for {
<-ticker.C <-ticker.C
api.filtersMu.Lock() api.filtersMu.Lock()