refresh snapshot only on online boxes

This commit is contained in:
shoopea
2022-06-17 22:07:37 +08:00
parent 23d7d90d20
commit 9594fd7970
2 changed files with 7 additions and 5 deletions

4
app.go
View File

@@ -518,7 +518,9 @@ func (a AppConfig) RefreshSnapshot() error {
refreshSnapshot := make(map[string]struct{})
for _, v := range a.Sources {
refreshSnapshot[v.Box()] = struct{}{}
if cfg.Box[v.Box()].online {
refreshSnapshot[v.Box()] = struct{}{}
}
}
for _, v := range a.Destinations {
if cfg.Box[v.Box()].online {