diff --git a/timecache/first_seen_cache.go b/timecache/first_seen_cache.go index f8626ae..351631c 100644 --- a/timecache/first_seen_cache.go +++ b/timecache/first_seen_cache.go @@ -29,7 +29,8 @@ func (tc FirstSeenCache) Add(s string) { _, ok := tc.m[s] if ok { - panic("putting the same entry twice not supported") + log.Debug("first-seen: got same entry") + return } // TODO(#515): Do GC in the background diff --git a/timecache/time_cache.go b/timecache/time_cache.go index f10ff21..2a67b4a 100644 --- a/timecache/time_cache.go +++ b/timecache/time_cache.go @@ -1,6 +1,12 @@ package timecache -import "time" +import ( + "time" + + logger "github.com/ipfs/go-log/v2" +) + +var log = logger.Logger("pubsub/timecache") type Strategy uint8