rocketmq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ding...@apache.org
Subject [rocketmq-client-go] branch native updated: fix(producer): update name server address immediately when client start ; or end up with a failed publish (#436)
Date Fri, 28 Feb 2020 12:35:08 GMT
This is an automated email from the ASF dual-hosted git repository.

dinglei pushed a commit to branch native
in repository https://gitbox.apache.org/repos/asf/rocketmq-client-go.git


The following commit(s) were added to refs/heads/native by this push:
     new 2af5495  fix(producer): update name server address immediately when client start
; or end up with a failed publish (#436)
2af5495 is described below

commit 2af5495d3b9674b9391ca92dce7d466da9f28756
Author: hzjiangjian <jiangjian224@126.com>
AuthorDate: Fri Feb 28 20:34:59 2020 +0800

    fix(producer): update name server address immediately when client start ; or end up with
a failed publish (#436)
---
 internal/client.go | 1 +
 1 file changed, 1 insertion(+)

diff --git a/internal/client.go b/internal/client.go
index 72debb0..a84aa33 100644
--- a/internal/client.go
+++ b/internal/client.go
@@ -262,6 +262,7 @@ func (c *rmqClient) Start() {
 		}
 		// fetchNameServerAddr
 		if len(c.option.NameServerAddrs) == 0 {
+			c.namesrvs.UpdateNameServerAddress(c.option.NameServerDomain, c.option.InstanceName)
 			go primitive.WithRecover(func() {
 				op := func() {
 					c.namesrvs.UpdateNameServerAddress(c.option.NameServerDomain, c.option.InstanceName)


Mime
View raw message