fix: add panic recovery to auto-scan, cap DHT nodes at 200

This commit is contained in:
Deivid Soto 2026-03-29 20:32:08 +02:00
parent c476bd865c
commit 3badde606e
2 changed files with 10 additions and 0 deletions

View file

@ -536,6 +536,11 @@ func runAutoScan(ctx context.Context, cfg config.Config, interval time.Duration)
}
doScan := func() {
defer func() {
if r := recover(); r != nil {
log.Printf("[auto-scan] panic recovered: %v", r)
}
}()
log.Printf("[auto-scan] starting scan of %s", cfg.Library.ScanPath)
existing, _ := library.LoadCache()