Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions internal/leadership/elector.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,10 @@ func (e *Elector) Start(ctx context.Context) error {
return nil
}

// We'll send to this channel anytime a leader resigns on the key with `name`
e.leaderResignedChan = make(chan struct{})
// We'll send to this channel anytime a leader resigns on the key with `name`.
// Buffered to 1 so a send doesn't block if the receiving loop hasn't entered
// its select yet (e.g. between gaining and maintaining leadership).
e.leaderResignedChan = make(chan struct{}, 1)

e.requestResignChan = make(chan struct{})

Expand Down
Loading