You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by GitBox <gi...@apache.org> on 2019/11/15 03:55:35 UTC

[GitHub] [dubbo-js] hufeng commented on a change in pull request #157: 修复重连不应该清空已有的provider

hufeng commented on a change in pull request #157: 修复重连不应该清空已有的provider
URL: https://github.com/apache/dubbo-js/pull/157#discussion_r346653400
 
 

 ##########
 File path: packages/dubbo/src/registry/zookeeper.ts
 ##########
 @@ -92,8 +95,10 @@ export class ZkRegistry extends Registry<IZkClientProps & IDubboRegistryProps> {
 
       for (let serviceUrl of dubboServiceUrls) {
         const url = DubboUrl.from(serviceUrl);
-        this._dubboServiceUrlMap.get(inf).push(url);
+        providerList.push(url);
       }
+      this._dubboServiceUrlMap.set(inf, providerList);
 
 Review comment:
   @binlaniua 是不是就简单直接一点
   
   ```ts
   this._dubboServiceUrlMap.set(inf, dubboServiceUrls.map(DubboUrl.from))
   ```

----------------------------------------------------------------
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

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org