mirror of
https://github.com/yusing/godoxy.git
synced 2026-03-17 23:14:21 +01:00
fix server not being restarted after config reload
This commit is contained in:
@@ -125,7 +125,7 @@ func Reload() E.Error {
|
||||
// -> replace config -> start new subtasks
|
||||
instance.task.Finish("config changed")
|
||||
instance = newCfg
|
||||
instance.Start()
|
||||
instance.Start(StartAllServers)
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -184,6 +184,8 @@ type StartServersOptions struct {
|
||||
Proxy, API bool
|
||||
}
|
||||
|
||||
var StartAllServers = &StartServersOptions{true, true}
|
||||
|
||||
func (cfg *Config) StartServers(opts ...*StartServersOptions) {
|
||||
if len(opts) == 0 {
|
||||
opts = append(opts, &StartServersOptions{})
|
||||
|
||||
Reference in New Issue
Block a user