Skip to content

Commit

Permalink
Pick from apache#7322 cd1d30f
Browse files Browse the repository at this point in the history
  • Loading branch information
AlbumenJ committed May 27, 2021
1 parent 1f4bbd6 commit 5e6c9d9
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
import java.util.concurrent.ExecutorService;
import java.util.concurrent.atomic.AtomicInteger;

import static org.apache.dubbo.remoting.Constants.RECONNECT_KEY;
import static org.apache.dubbo.remoting.Constants.SEND_RECONNECT_KEY;
import static org.apache.dubbo.rpc.protocol.dubbo.Constants.LAZY_CONNECT_INITIAL_STATE_KEY;

Expand Down Expand Up @@ -181,7 +180,7 @@ public void startClose() {
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(RECONNECT_KEY, Boolean.FALSE)
.addParameter(SEND_RECONNECT_KEY, Boolean.TRUE.toString())
.addParameter(LazyConnectExchangeClient.REQUEST_WITH_WARNING_KEY, true);

Expand All @@ -204,5 +203,9 @@ public boolean isClosed() {
public void incrementAndGetCount() {
referenceCount.incrementAndGet();
}

public int getCount(){
return referenceCount.get();
}
}

0 comments on commit 5e6c9d9

Please sign in to comment.