You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by mm...@apache.org on 2020/06/09 03:46:36 UTC

[pulsar-client-go] branch master updated: Stop partition discovery on Close (#271) (#272)

This is an automated email from the ASF dual-hosted git repository.

mmerli pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pulsar-client-go.git


The following commit(s) were added to refs/heads/master by this push:
     new 9ed8af8  Stop partition discovery on Close (#271) (#272)
9ed8af8 is described below

commit 9ed8af8ee1df594cb3d072c7ad667d678ceee46d
Author: Denis Vergnes <de...@gmail.com>
AuthorDate: Mon Jun 8 20:46:29 2020 -0700

    Stop partition discovery on Close (#271) (#272)
---
 pulsar/producer_impl.go | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/pulsar/producer_impl.go b/pulsar/producer_impl.go
index 1404045..fc9019a 100644
--- a/pulsar/producer_impl.go
+++ b/pulsar/producer_impl.go
@@ -247,6 +247,9 @@ func (p *producer) Flush() error {
 func (p *producer) Close() {
 	p.Lock()
 	defer p.Unlock()
+	if p.ticker != nil {
+		p.ticker.Stop()
+	}
 
 	for _, pp := range p.producers {
 		pp.Close()