mirror of
https://github.com/yggdrasil-network/yggdrasil-go.git
synced 2024-12-23 16:37:31 +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 {
|
||||
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
|
||||
}
|
||||
m.log.Debugln("Starting multicast module")
|
||||
|
Loading…
x
Reference in New Issue
Block a user