Various API changes and simplifications to fix mobile builds

This commit is contained in:
Neil Alexander 2019-07-27 15:00:09 +01:00
parent 9b99f0b5e4
commit de1005e4fa
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944
13 changed files with 63 additions and 122 deletions

View file

@ -60,7 +60,7 @@ func (a *AdminSocket) Init(c *yggdrasil.Core, state *config.NodeState, log *log.
go func() {
for {
e := <-a.reconfigure
current, previous := state.Get()
current, previous := state.GetCurrent(), state.GetPrevious()
if current.AdminListen != previous.AdminListen {
a.listenaddr = current.AdminListen
a.Stop()
@ -69,7 +69,7 @@ func (a *AdminSocket) Init(c *yggdrasil.Core, state *config.NodeState, log *log.
e <- nil
}
}()
current, _ := state.Get()
current := state.GetCurrent()
a.listenaddr = current.AdminListen
a.AddHandler("list", []string{}, func(in Info) (Info, error) {
handlers := make(map[string]interface{})