Skip to content

Commit

Permalink
Golang: fix goroutine leak issue (apache#613)
Browse files Browse the repository at this point in the history
* fix goroutine leak

* test version

* Revert "test version"

This reverts commit 23da93c.

* fix: correct spell errors

Signed-off-by: Li Zhanhui <[email protected]>

---------

Signed-off-by: Li Zhanhui <[email protected]>
Co-authored-by: bo.jiang03 <[email protected]>
Co-authored-by: Li Zhanhui <[email protected]>
  • Loading branch information
3 people authored Nov 27, 2023
1 parent bd9c1a1 commit e2c0b97
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions golang/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,11 @@ func (cs *defaultClientSession) startUp() {
cs.cli.log.Infof("defaultClientSession is startUp! endpoints=%v", cs.endpoints)
go func() {
for {
select {
case <-cs.cli.done:
return
default:
}
// ensure that observer is present, if not wait for it to be regenerated on publish.
observer, acquired_observer := cs._acquire_observer()
if !acquired_observer {
Expand Down

0 comments on commit e2c0b97

Please sign in to comment.