mirror of
https://github.com/yusing/godoxy.git
synced 2025-06-01 09:32:35 +02:00
fix server not being restarted after config reload
This commit is contained in:
parent
9e76ebd03e
commit
ee5c9e0bf4
1 changed files with 3 additions and 1 deletions
|
@ -124,7 +124,7 @@ func Reload() E.Error {
|
||||||
// -> replace config -> start new subtasks
|
// -> replace config -> start new subtasks
|
||||||
instance.task.Finish("config changed")
|
instance.task.Finish("config changed")
|
||||||
instance = newCfg
|
instance = newCfg
|
||||||
instance.Start()
|
instance.Start(StartAllServers)
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -183,6 +183,8 @@ type StartServersOptions struct {
|
||||||
Proxy, API bool
|
Proxy, API bool
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var StartAllServers = &StartServersOptions{true, true}
|
||||||
|
|
||||||
func (cfg *Config) StartServers(opts ...*StartServersOptions) {
|
func (cfg *Config) StartServers(opts ...*StartServersOptions) {
|
||||||
if len(opts) == 0 {
|
if len(opts) == 0 {
|
||||||
opts = append(opts, &StartServersOptions{})
|
opts = append(opts, &StartServersOptions{})
|
||||||
|
|
Loading…
Add table
Reference in a new issue