You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2019/11/02 03:25:10 UTC

[GitHub] [pulsar-client-go] sijie commented on a change in pull request #81: Add reconnect timeout after unload topic

sijie commented on a change in pull request #81: Add reconnect timeout after unload topic
URL: https://github.com/apache/pulsar-client-go/pull/81#discussion_r341797384
 
 

 ##########
 File path: 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 second to reconnect
+	time.Sleep(1 * time.Second)
 
 Review comment:
   @tuteng I am not sure this is a right fix. It seems to me that we didn't handle the exception `ServiceNotReady` well. I think we need to add logic to handle `ServiceNotReady` and reconnect.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services