Use SetTransport method.

This commit is contained in:
Mariano Cano 2019-04-12 11:06:38 -07:00
parent de1114c3c6
commit fa216ccaad

View file

@ -60,7 +60,7 @@ func (c *Client) getClientTLSConfig(ctx context.Context, sign *api.SignResponse,
renewer.RenewCertificate = getRenewFunc(tlsCtx, c, tr, pk)
// Update client transport
c.client.Transport = tr
c.SetTransport(tr)
// Start renewer
renewer.RunContext(ctx)
@ -111,7 +111,7 @@ func (c *Client) GetServerTLSConfig(ctx context.Context, sign *api.SignResponse,
renewer.RenewCertificate = getRenewFunc(tlsCtx, c, tr, pk)
// Update client transport
c.client.Transport = tr
c.SetTransport(tr)
// Start renewer
renewer.RunContext(ctx)
@ -161,7 +161,7 @@ func (c *Client) GetCertificateRenewer(sign *api.SignResponse, pk crypto.Private
renewer.RenewCertificate = getRenewFunc(tlsCtx, c, tr, pk)
// Update client transport
c.client.Transport = tr
c.SetTransport(tr)
return renewer, nil
}