MCPcopy Create free account
hub / github.com/aiprodcoder/MIXAPI / removeExpiredPairs

Function removeExpiredPairs

common/verification.go:64–71  ·  view source on GitHub ↗

no lock inside, so the caller must lock the verificationMap before calling!

()

Source from the content-addressed store, hash-verified

62
63// no lock inside, so the caller must lock the verificationMap before calling!
64func removeExpiredPairs() {
65 now := time.Now()
66 for key := range verificationMap {
67 if int(now.Sub(verificationMap[key].time).Seconds()) >= VerificationValidMinutes*60 {
68 delete(verificationMap, key)
69 }
70 }
71}
72
73func init() {
74 verificationMutex.Lock()

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected