Skip to content

Commit

Permalink
[discovery] missing defer .Stop on ticker
Browse files Browse the repository at this point in the history
  • Loading branch information
fxfactorial committed Apr 17, 2020
1 parent 6f4961b commit 28f45ac
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion p2p/discovery/mdns.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,9 @@ func (m *mdnsService) Close() error {
}

func (m *mdnsService) pollForEntries(ctx context.Context) {

ticker := time.NewTicker(m.interval)
defer ticker.Stop()

for {
//execute mdns query right away at method call and then with every tick
entriesCh := make(chan *mdns.ServiceEntry, 16)
Expand Down

0 comments on commit 28f45ac

Please sign in to comment.