Allow disabling admin socket with AdminListen="none"

This commit is contained in:
Neil Alexander 2018-12-09 17:46:48 +00:00
parent 9724dd2351
commit 80d087404f
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944
2 changed files with 4 additions and 2 deletions

View file

@ -326,7 +326,9 @@ func (a *admin) init(c *Core, listenaddr string) {
// start runs the admin API socket to listen for / respond to admin API calls.
func (a *admin) start() error {
go a.listen()
if a.listenaddr != "none" {
go a.listen()
}
return nil
}