mirror of
				https://github.com/yggdrasil-network/yggdrasil-go.git
				synced 2025-11-04 11:15:07 +03:00 
			
		
		
		
	Allow updating AdminListen during runtime
This commit is contained in:
		
							parent
							
								
									7fae1c993a
								
							
						
					
					
						commit
						f96747181d
					
				
					 2 changed files with 125 additions and 110 deletions
				
			
		| 
						 | 
				
			
			@ -61,7 +61,9 @@ func (a *admin) init(c *Core) {
 | 
			
		|||
			case e := <-a.reconfigure:
 | 
			
		||||
				a.core.configMutex.RLock()
 | 
			
		||||
				if a.core.config.AdminListen != a.core.configOld.AdminListen {
 | 
			
		||||
					a.core.log.Println("AdminListen has changed!")
 | 
			
		||||
					a.listenaddr = a.core.config.AdminListen
 | 
			
		||||
					a.close()
 | 
			
		||||
					a.start()
 | 
			
		||||
				}
 | 
			
		||||
				a.core.configMutex.RUnlock()
 | 
			
		||||
				e <- nil
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue