Fix renew of certificate at the start of the server.

This commit is contained in:
Mariano Cano 2020-05-07 18:21:11 -07:00
parent e855707dc2
commit 9f1d95d8bf

View file

@ -51,6 +51,7 @@ func NewTLSRenewer(cert *tls.Certificate, fn RenewFunc, opts ...tlsRenewerOption
r := &TLSRenewer{ r := &TLSRenewer{
RenewCertificate: fn, RenewCertificate: fn,
cert: cert, cert: cert,
certNotAfter: cert.Leaf.NotAfter.Add(-1 * time.Minute),
} }
for _, f := range opts { for _, f := range opts {