mirror of
https://github.com/yggdrasil-network/yggdrasil-go
synced 2024-11-09 23:20:26 +03: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…
Reference in New Issue
Block a user