public bool IsPreFetchCertificate(Certificate cert) { //已经在取了,取消 if (this.prefetchingCertIds.Contains(cert.Id)) return false; string key = cert.getStrPubKey(); //证书缓存中有该项 //0.3f是一个较小的值 if (this.CertificateCache.ContainsKey(key) && scheduler.currentTime - this.CertificateCache[key].time > 10-global.checkCertDelay-0.3f) return true; else return false; }
public float GetCheckCertificateDelay(Certificate cert) { string key = cert.getStrPubKey(); //证书缓存中有该项 if (this.CertificateCache.ContainsKey(key) && scheduler.currentTime - this.CertificateCache[key].time < 10) return 0; return global.checkCertDelay; }