mirror of
https://github.com/tuna/tunasync.git
synced 2025-04-20 20:22: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"))
|
||||
if err != nil {
|
||||
logger.Errorf("Error loading config: %s", err.Error())
|
||||
} else {
|
||||
w.ReloadMirrorConfig(newCfg.Mirrors)
|
||||
}
|
||||
w.ReloadMirrorConfig(newCfg.Mirrors)
|
||||
case syscall.SIGINT, syscall.SIGTERM:
|
||||
w.Halt()
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user