Clean up StatsFetcher work when context is exceeded (#6086)
This commit is contained in:
parent
6cc936d64b
commit
f5634a24e8
|
@ -107,6 +107,10 @@ func (f *StatsFetcher) Fetch(ctx context.Context, members []serf.Member) map[str
|
|||
case <-ctx.Done():
|
||||
f.logger.Printf("[WARN] consul: error getting server health from %q: %v",
|
||||
workItem.server.Name, ctx.Err())
|
||||
|
||||
f.inflightLock.Lock()
|
||||
delete(f.inflight, workItem.server.ID)
|
||||
f.inflightLock.Unlock()
|
||||
}
|
||||
}
|
||||
return replies
|
||||
|
|
Loading…
Reference in New Issue