Skip to content

Commit

Permalink
fix: fake source Stop with queue shutdown with drain ensure all item …
Browse files Browse the repository at this point in the history
…be processed

Signed-off-by: zedongh <248348907@qq.com>
  • Loading branch information
zedongh committed Dec 19, 2024
1 parent b0c1a56 commit 80317d6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/agent/config/source/fake_source.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ func (f *fakeSource) GetLatestConfig() (cfg *api.ColocationConfig, err error) {
func (f *fakeSource) Stop() {
for {
if f.queue.Len() == 0 {
f.queue.ShutDown()
f.queue.ShutDownWithDrain()
return
}
time.Sleep(1 * time.Second)
Expand Down

0 comments on commit 80317d6

Please sign in to comment.