mirror of
https://github.com/hashicorp/vault.git
synced 2026-05-04 20:06:27 +02:00
Buffer authhandler output channel to prevent hang on shutdown (#5507)
Fixes #5026
This commit is contained in:
parent
574a08c064
commit
d7655a9db0
@ -43,8 +43,10 @@ type AuthHandlerConfig struct {
|
||||
|
||||
func NewAuthHandler(conf *AuthHandlerConfig) *AuthHandler {
|
||||
ah := &AuthHandler{
|
||||
DoneCh: make(chan struct{}),
|
||||
OutputCh: make(chan string),
|
||||
DoneCh: make(chan struct{}),
|
||||
// This is buffered so that if we try to output after the sink server
|
||||
// has been shut down, during agent shutdown, we won't block
|
||||
OutputCh: make(chan string, 1),
|
||||
logger: conf.Logger,
|
||||
client: conf.Client,
|
||||
random: rand.New(rand.NewSource(int64(time.Now().Nanosecond()))),
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user