mirror of
				https://github.com/yggdrasil-network/yggdrasil-go.git
				synced 2025-11-04 03:05:07 +03:00 
			
		
		
		
	Don't start multicast module if all Beacon and Listen are disabled
				
					
				
			This commit is contained in:
		
							parent
							
								
									35ea66d651
								
							
						
					
					
						commit
						65e350153e
					
				
					 1 changed files with 5 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -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…
	
	Add table
		Add a link
		
	
		Reference in a new issue