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 2021/09/18 02:19:10 UTC

[GitHub] [dubbo] changfubai commented on a change in pull request #8814: [3.0] do not show the warning at first replaceWithLazyClient()

changfubai commented on a change in pull request #8814:
URL: https://github.com/apache/dubbo/pull/8814#discussion_r711425712



##########
File path: dubbo-rpc/dubbo-rpc-dubbo/src/main/java/org/apache/dubbo/rpc/protocol/dubbo/ReferenceCountExchangeClient.java
##########
@@ -197,20 +197,19 @@ public void startClose() {
      * @return
      */
     private void replaceWithLazyClient() {
-        // this is a defensive operation to avoid client is closed by accident, the initial state of the client is false
-        URL lazyUrl = url.addParameter(LAZY_CONNECT_INITIAL_STATE_KEY, Boolean.TRUE)
-                //.addParameter(RECONNECT_KEY, Boolean.FALSE)
-                .addParameter(SEND_RECONNECT_KEY, Boolean.TRUE.toString());
-        //.addParameter(LazyConnectExchangeClient.REQUEST_WITH_WARNING_KEY, true);
-
-        if (disconnectCount.getAndIncrement() % maxDisconnectCount == 0) {
+        if (disconnectCount.getAndIncrement() % maxDisconnectCount == 1) {

Review comment:
       这个我觉得原逻辑应该是正确的,改完了调用close一次就触发了错误日志了




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

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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