eth/filters: add missing Ticker.Stop call (#20862)

This commit is contained in:
ucwong 2020-04-02 18:31:50 +08:00 committed by GitHub
parent 228a297056
commit 47f7c736cb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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