Skip to content

Commit c5484d2

Browse files
committed
Merge branch 'v3.5.x' into v3.6.x
2 parents 771d316 + 6df6c0c commit c5484d2

File tree

1 file changed

+4
-1
lines changed
  • src/scene_server/datacollection/datacollection

1 file changed

+4
-1
lines changed

src/scene_server/datacollection/datacollection/porter.go

+4-1
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,10 @@ func (p *chanPorter) subscribeLoop() error {
269269
if nil != err {
270270
return fmt.Errorf("subscribe channel failed, %v", err)
271271
}
272-
defer subChan.Unsubscribe(p.channels...)
272+
defer func() {
273+
_ = subChan.Unsubscribe(p.channels...)
274+
_ = subChan.Close()
275+
}()
273276

274277
blog.Info("[data-collection][%s] subscribing channel %v from redis", p.name, p.channels)
275278
defer blog.Info("[data-collection][%s] unsubscribe channel %v from redis", p.name, p.channels)

0 commit comments

Comments
 (0)