Skip to content

Commit

Permalink
Use certificate name as singleflight key
Browse files Browse the repository at this point in the history
Fixes #130
  • Loading branch information
johanbrandhorst committed Aug 21, 2021
1 parent 168d95c commit 34e9548
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions certify.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,8 @@ func (c *Certify) getOrRenewCert(name string) (*tls.Certificate, error) {
return nil, err
}

// De-duplicate simultaneous requests
ch := c.issueGroup.DoChan("issue", func() (interface{}, error) {
// De-duplicate simultaneous requests for the same name
ch := c.issueGroup.DoChan(name, func() (interface{}, error) {
c.Logger.Debug("Requesting new certificate from issuer")
conf := c.CertConfig.Clone()
conf.appendName(name)
Expand Down

0 comments on commit 34e9548

Please sign in to comment.