diff --git a/p2p/discovery/mdns/mdns.go b/p2p/discovery/mdns/mdns.go index b9042cfe8a..5945e5e65d 100644 --- a/p2p/discovery/mdns/mdns.go +++ b/p2p/discovery/mdns/mdns.go @@ -80,7 +80,11 @@ func (s *mdnsService) Start() error { return err } go func() { - defer ipEvt.Close() + defer func() { + if err := ipEvt.Close(); err != nil { + log.Errorf("failed to close ipEvt: %s", err) + } + }() var addrUpdateDebounce sync.Once for { select {