Skip to content

Commit 2af5495

Browse files
authored
fix(producer): update name server address immediately when client start ; or end up with a failed publish (apache#436)
1 parent af4067c commit 2af5495

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

internal/client.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,7 @@ func (c *rmqClient) Start() {
262262
}
263263
// fetchNameServerAddr
264264
if len(c.option.NameServerAddrs) == 0 {
265+
c.namesrvs.UpdateNameServerAddress(c.option.NameServerDomain, c.option.InstanceName)
265266
go primitive.WithRecover(func() {
266267
op := func() {
267268
c.namesrvs.UpdateNameServerAddress(c.option.NameServerDomain, c.option.InstanceName)

0 commit comments

Comments
 (0)