good morning!!!!

Skip to content
Snippets Groups Projects
Unverified Commit c87cdd30 authored by ucwong's avatar ucwong Committed by GitHub
Browse files

p2p/discv5: add missing Timer.Stop calls (#20853)

parent f15849cf
No related branches found
No related tags found
No related merge requests found
......@@ -357,6 +357,8 @@ func (net *Network) loop() {
bucketRefreshTimer = time.NewTimer(bucketRefreshInterval)
refreshDone chan struct{} // closed when the 'refresh' lookup has ended
)
defer refreshTimer.Stop()
defer bucketRefreshTimer.Stop()
// Tracking the next ticket to register.
var (
......@@ -393,11 +395,13 @@ func (net *Network) loop() {
searchInfo = make(map[Topic]topicSearchInfo)
activeSearchCount int
)
defer topicRegisterLookupTick.Stop()
topicSearchLookupDone := make(chan topicSearchResult, 100)
topicSearch := make(chan Topic, 100)
<-topicRegisterLookupTick.C
statsDump := time.NewTicker(10 * time.Second)
defer statsDump.Stop()
loop:
for {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment