Skip to content

Commit

Permalink
Buffer doneCh
Browse files Browse the repository at this point in the history
  • Loading branch information
sethvargo committed Jun 29, 2017
1 parent b8b56b5 commit 44501db
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions api/renewer.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ func (c *Client) NewRenewer(i *RenewerInput) (*Renewer, error) {
secret: secret,
grace: grace,
random: random,
doneCh: make(chan error),
doneCh: make(chan error, 1),
renewCh: make(chan *RenewOutput, renewBuffer),

stopped: false,
Expand Down Expand Up @@ -158,9 +158,6 @@ func (r *Renewer) Stop() {
// Renew starts a background process for renewing this secret. When the secret
// is has auth data, this attempts to renew the auth (token). When the secret
// has a lease, this attempts to renew the lease.
//
// This function will not return if nothing is reading from doneCh (it blocks)
// on a write to the channel.
func (r *Renewer) Renew() {
var result error
if r.secret.Auth != nil {
Expand Down

0 comments on commit 44501db

Please sign in to comment.