Skip to content

Commit

Permalink
correct refcount
Browse files Browse the repository at this point in the history
  • Loading branch information
aarshkshah1992 committed Jan 18, 2021
1 parent 3d54a98 commit fb39f1f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions rtrefresh/rt_refresh_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,9 @@ func (r *RtRefreshManager) Close() error {
// error and close. The channel is buffered and safe to ignore.
func (r *RtRefreshManager) Refresh(force bool) <-chan error {
resp := make(chan error, 1)
r.refcount.Add(1)
go func() {
defer r.refcount.Done()
select {
case r.triggerRefresh <- &triggerRefreshReq{respCh: resp, forceCplRefresh: force}:
case <-r.ctx.Done():
Expand Down

0 comments on commit fb39f1f

Please sign in to comment.