diff --git a/history-server/favicon.go b/history-server/favicon.go index e65ffc9..e81288d 100644 --- a/history-server/favicon.go +++ b/history-server/favicon.go @@ -208,7 +208,15 @@ func faviconWorker() { err := fetchFavicon(hostport) faviconMu.Lock() delete(faviconQueued, hostport) - faviconAttempted[hostport] = time.Now() + if err != nil { + // 只给**失败**留节流记录 + faviconAttempted[hostport] = time.Now() + } else { + // 成功则不留下尝试记录:这样日后缓存文件被删(手工清理、数据卷恢复)时, + // 下一次 rebuild 能立刻重抓,而不是被 faviconRetryGap 永久挡住 + // (实测踩到:删掉缓存的三个图标后一直不再抓,只有重启容器才会重抓)。 + delete(faviconAttempted, hostport) + } faviconMu.Unlock() if err != nil { log.Printf("favicon: %s: %v", hostport, err)