Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-pages.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlessio Caiazza <acaiazza@gitlab.com>2020-02-28 19:27:04 +0300
committerAlessio Caiazza <acaiazza@gitlab.com>2020-02-28 19:48:48 +0300
commit499767af2cbc5e6d27a6183c1da416f65b5895cc (patch)
treeca9023d0e09fab09b6e21f3ee738c95a8f482f18
parent9a966c4c62bed9312123dfbd76bbd29f0a1cb4cc (diff)
Slow down the benchmarkbenchstat-tuning-domain
-rw-r--r--internal/domain/domain.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/internal/domain/domain.go b/internal/domain/domain.go
index 17a0e1d3..748268e3 100644
--- a/internal/domain/domain.go
+++ b/internal/domain/domain.go
@@ -5,6 +5,7 @@ import (
"errors"
"net/http"
"sync"
+ "time"
"gitlab.com/gitlab-org/gitlab-pages/internal/httperrors"
"gitlab.com/gitlab-org/gitlab-pages/internal/serving"
@@ -125,6 +126,7 @@ func (d *Domain) HasLookupPath(r *http.Request) bool {
// EnsureCertificate parses the PEM-encoded certificate for the domain
func (d *Domain) EnsureCertificate() (*tls.Certificate, error) {
+ time.Sleep(10 * time.Second)
if d.isUnconfigured() || len(d.CertificateKey) == 0 || len(d.CertificateCert) == 0 {
return nil, errors.New("tls certificates can be loaded only for pages with configuration")
}