4
0
mirror of https://github.com/cwinfo/yggdrasil-go.git synced 2025-06-14 23:16:06 +00:00

Allow updating AdminListen during runtime

This commit is contained in:
Neil Alexander
2018-12-30 12:26:55 +00:00
parent 7fae1c993a
commit f96747181d
2 changed files with 125 additions and 110 deletions

View File

@ -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