From 5ad14170fbd64cce64886623428a7a1348525763 Mon Sep 17 00:00:00 2001 From: Jacob Hoffman-Andrews Date: Wed, 23 May 2018 12:50:30 -0700 Subject: [PATCH] Ignore canceled IsSafeDomain calls. (#3730) Fixes #3681. --- va/gsb.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/va/gsb.go b/va/gsb.go index b385e792f..ebf0da535 100644 --- a/va/gsb.go +++ b/va/gsb.go @@ -6,6 +6,7 @@ import ( safebrowsingv4 "github.com/google/safebrowsing" "golang.org/x/net/context" + "github.com/letsencrypt/boulder/canceled" bgrpc "github.com/letsencrypt/boulder/grpc" vaPB "github.com/letsencrypt/boulder/va/proto" ) @@ -48,6 +49,12 @@ func (va *ValidationAuthorityImpl) isSafeDomain(ctx context.Context, domain stri } list, err := va.safeBrowsing.IsListed(ctx, domain) + if canceled.Is(err) { + // Sometimes an IsListed request will be canceled because the main + // validation failed, causing the parent context to be canceled. + stats.Inc("IsSafeDomain.Canceled", 1) + return true + } if err != nil { stats.Inc("IsSafeDomain.Errors", 1) // In the event of an error checking the GSB status we allow the domain in