Skip to content

Commit

Permalink
Add default case for if the step down channel is blocked
Browse files Browse the repository at this point in the history
  • Loading branch information
jefferai committed Mar 3, 2016
1 parent 1ae2f2f commit 4e964a6
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion vault/core.go
Expand Up @@ -1269,7 +1269,11 @@ func (c *Core) StepDown(token string) error {
return logical.ErrPermissionDenied
}

c.manualStepDownCh <- struct{}{}
select {
case c.manualStepDownCh <- struct{}{}:
default:
c.logger.Printf("[WARN] core: manual step-down operation already queued")
}

return nil
}
Expand Down

0 comments on commit 4e964a6

Please sign in to comment.