Skip to content

Commit e742220

Browse files
aarshkshah1992Stebalien
authored andcommitted
correct refcount
1 parent 980c6ad commit e742220

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

rtrefresh/rt_refresh_manager.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,9 @@ func (r *RtRefreshManager) Close() error {
104104
// error and close. The channel is buffered and safe to ignore.
105105
func (r *RtRefreshManager) Refresh(force bool) <-chan error {
106106
resp := make(chan error, 1)
107+
r.refcount.Add(1)
107108
go func() {
109+
defer r.refcount.Done()
108110
select {
109111
case r.triggerRefresh <- &triggerRefreshReq{respCh: resp, forceCplRefresh: force}:
110112
case <-r.ctx.Done():

0 commit comments

Comments
 (0)