Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions p2p/discv5/net.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down Expand Up @@ -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 {
Expand Down