Skip to content

Commit

Permalink
address comment
Browse files Browse the repository at this point in the history
Signed-off-by: HunDunDM <hundundm@gmail.com>
  • Loading branch information
HunDunDM authored and ti-chi-bot committed Sep 24, 2021
1 parent 34e1abf commit bd520e5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/encryptionkm/key_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ func (m *KeyManager) StartBackgroundLoop(ctx context.Context) {
for {
select {
case resp, ok = <-rch:
if !ok || resp.CompactRevision != 0 || resp.Canceled {
if !ok || resp.Err() != nil {
// If chan is closed or canceled, exit watch loop
// Ref https://etcd.io/docs/v3.4/learning/api/#watch-streams
break keyWatchLoop
Expand Down

0 comments on commit bd520e5

Please sign in to comment.