mirror of
https://github.com/cwinfo/yggdrasil-go.git
synced 2024-11-24 05:41:34 +00:00
Don't start multicast module if all Beacon
and Listen
are disabled
This commit is contained in:
parent
35ea66d651
commit
65e350153e
@ -77,7 +77,11 @@ func (m *Multicast) _start() error {
|
|||||||
if m._isOpen {
|
if m._isOpen {
|
||||||
return fmt.Errorf("multicast module is already started")
|
return fmt.Errorf("multicast module is already started")
|
||||||
}
|
}
|
||||||
if len(m.config._interfaces) == 0 {
|
var anyEnabled bool
|
||||||
|
for intf := range m.config._interfaces {
|
||||||
|
anyEnabled = anyEnabled || intf.Beacon || intf.Listen
|
||||||
|
}
|
||||||
|
if !anyEnabled {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
m.log.Debugln("Starting multicast module")
|
m.log.Debugln("Starting multicast module")
|
||||||
|
Loading…
Reference in New Issue
Block a user