diff --git a/src/core/link.go b/src/core/link.go index 2eb480d..4a8df53 100644 --- a/src/core/link.go +++ b/src/core/link.go @@ -422,7 +422,10 @@ func (l *links) listen(u *url.URL, sintf string) (*Listener, error) { li := &Listener{ listener: listener, ctx: ctx, - Cancel: cancel, + Cancel: func() { + cancel() + _ = listener.Close() + }, } var options linkOptions diff --git a/src/multicast/multicast.go b/src/multicast/multicast.go index 902d772..32f5dca 100644 --- a/src/multicast/multicast.go +++ b/src/multicast/multicast.go @@ -190,6 +190,8 @@ func (m *Multicast) _getAllowedInterfaces() map[string]*interfaceInfo { switch { case iface.Flags&net.FlagUp == 0: continue // Ignore interfaces that are down + case iface.Flags&net.FlagRunning == 0: + continue // Ignore interfaces that are not running case iface.Flags&net.FlagMulticast == 0: continue // Ignore non-multicast interfaces case iface.Flags&net.FlagPointToPoint != 0: