Skip to content

Commit

Permalink
Merge branch 'v3.5.x' into v3.6.x
Browse files Browse the repository at this point in the history
  • Loading branch information
breezelxp committed Feb 26, 2020
2 parents 771d316 + 6df6c0c commit c5484d2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/scene_server/datacollection/datacollection/porter.go
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,10 @@ func (p *chanPorter) subscribeLoop() error {
if nil != err {
return fmt.Errorf("subscribe channel failed, %v", err)
}
defer subChan.Unsubscribe(p.channels...)
defer func() {
_ = subChan.Unsubscribe(p.channels...)
_ = subChan.Close()
}()

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

0 comments on commit c5484d2

Please sign in to comment.