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 683c9ac  feat(nameserver): correct impl of UpdateTopicRouteInfo (#406)
683c9ac is described below

commit 683c9ac161e5b82a94517dec66ffc3933b6017d7
Author: xujianhai666 <[email protected]>
AuthorDate: Wed Feb 12 15:08:51 2020 +0800

    feat(nameserver): correct impl of UpdateTopicRouteInfo (#406)
    
    default Topic is extra for UpdateTopicRouteInfo, and will cause incorrect 
config to retry topic.
    
    Closes #404
---
 internal/route.go | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

diff --git a/internal/route.go b/internal/route.go
index 181ebe9..d3a5f01 100644
--- a/internal/route.go
+++ b/internal/route.go
@@ -118,13 +118,10 @@ func (s *namesrvs) UpdateTopicRouteInfo(topic string) 
(*TopicRouteData, bool) {
 
        routeData, err := s.queryTopicRouteInfoFromServer(topic)
        if err != nil {
-               routeData, err = s.queryTopicRouteInfoFromServer(defaultTopic)
-               if err != nil {
-                       rlog.Warning("query topic route from server error", 
map[string]interface{}{
-                               rlog.LogKeyUnderlayError: err,
-                       })
-                       return nil, false
-               }
+               rlog.Warning("query topic route from server error", 
map[string]interface{}{
+                       rlog.LogKeyUnderlayError: err,
+               })
+               return nil, false
        }
 
        if routeData == nil {

Reply via email to