This is an automated email from the ASF dual-hosted git repository.
guangning pushed a commit to branch fix/topic-unload-reconnect
in repository https://gitbox.apache.org/repos/asf/pulsar-client-go.git
The following commit(s) were added to refs/heads/fix/topic-unload-reconnect by
this push:
new b853799 Fix reconnect after unload topic
b853799 is described below
commit b85379902a3f378e1d95d4c50fdd37291c8b4011
Author: tuteng <[email protected]>
AuthorDate: Sat Nov 2 10:57:54 2019 +0800
Fix reconnect after unload topic
---
pulsar/impl_partition_producer.go | 2 ++
1 file changed, 2 insertions(+)
diff --git a/pulsar/impl_partition_producer.go
b/pulsar/impl_partition_producer.go
index 196dbbc..c06b47e 100644
--- a/pulsar/impl_partition_producer.go
+++ b/pulsar/impl_partition_producer.go
@@ -176,6 +176,8 @@ func (p *partitionProducer) ConnectionClosed() {
func (p *partitionProducer) reconnectToBroker() {
p.log.Info("Reconnecting to broker")
backoff := internal.Backoff{}
+ // Delay one secnd to reconnect
+ time.Sleep(1 * time.Second)
for {
if p.state != producerReady {
// Producer is already closing