mirror of
				https://github.com/yggdrasil-network/yggdrasil-go.git
				synced 2025-11-03 18:55:08 +03:00 
			
		
		
		
	Address some comments
This commit is contained in:
		
							parent
							
								
									3bf53796a7
								
							
						
					
					
						commit
						39567bed83
					
				
					 2 changed files with 7 additions and 8 deletions
				
			
		| 
						 | 
					@ -38,15 +38,13 @@ func (c *cryptokey) init(core *Core) {
 | 
				
			||||||
	c.reconfigure = make(chan chan error, 1)
 | 
						c.reconfigure = make(chan chan error, 1)
 | 
				
			||||||
	go func() {
 | 
						go func() {
 | 
				
			||||||
		for {
 | 
							for {
 | 
				
			||||||
			select {
 | 
								e := <-c.reconfigure
 | 
				
			||||||
			case e := <-c.reconfigure:
 | 
					 | 
				
			||||||
			var err error
 | 
								var err error
 | 
				
			||||||
			c.core.router.doAdmin(func() {
 | 
								c.core.router.doAdmin(func() {
 | 
				
			||||||
				err = c.core.router.cryptokey.configure()
 | 
									err = c.core.router.cryptokey.configure()
 | 
				
			||||||
			})
 | 
								})
 | 
				
			||||||
			e <- err
 | 
								e <- err
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
		}
 | 
					 | 
				
			||||||
	}()
 | 
						}()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if err := c.configure(); err != nil {
 | 
						if err := c.configure(); err != nil {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -54,6 +54,7 @@ func (tun *tunAdapter) init(core *Core, send chan<- []byte, recv <-chan []byte)
 | 
				
			||||||
					tun.core.config.IfMTU != tun.core.configOld.IfMTU
 | 
										tun.core.config.IfMTU != tun.core.configOld.IfMTU
 | 
				
			||||||
				tun.core.configMutex.RUnlock()
 | 
									tun.core.configMutex.RUnlock()
 | 
				
			||||||
				if updated {
 | 
									if updated {
 | 
				
			||||||
 | 
										tun.core.log.Println("Reconfiguring TUN/TAP is not supported yet")
 | 
				
			||||||
					e <- nil
 | 
										e <- nil
 | 
				
			||||||
				} else {
 | 
									} else {
 | 
				
			||||||
					e <- nil
 | 
										e <- nil
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue