mirror of
https://github.com/tuna/tunasync.git
synced 2025-04-21 04:42:46 +00:00
fix(worker): do not reload if config has errors
This commit is contained in:
parent
3762e7a1a5
commit
fa98e4f029
@ -70,8 +70,9 @@ func startWorker(c *cli.Context) {
|
|||||||
newCfg, err := worker.LoadConfig(c.String("config"))
|
newCfg, err := worker.LoadConfig(c.String("config"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
logger.Errorf("Error loading config: %s", err.Error())
|
logger.Errorf("Error loading config: %s", err.Error())
|
||||||
}
|
} else {
|
||||||
w.ReloadMirrorConfig(newCfg.Mirrors)
|
w.ReloadMirrorConfig(newCfg.Mirrors)
|
||||||
|
}
|
||||||
case syscall.SIGINT, syscall.SIGTERM:
|
case syscall.SIGINT, syscall.SIGTERM:
|
||||||
w.Halt()
|
w.Halt()
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user