This is an automated email from the ASF dual-hosted git repository.
albumenj pushed a commit to branch 3.0
in repository https://gitbox.apache.org/repos/asf/dubbo.git
The following commit(s) were added to refs/heads/3.0 by this push:
new 34f8fe3 Rebuild InstanceAddressURL to ServiceConfigURL for
LazyConnectExchangeClient (#9041)
34f8fe3 is described below
commit 34f8fe3d60c026c6ba0de8e8fe75da66a19c83b5
Author: Albumen Kevin <[email protected]>
AuthorDate: Fri Oct 15 15:22:30 2021 +0800
Rebuild InstanceAddressURL to ServiceConfigURL for
LazyConnectExchangeClient (#9041)
---
.../apache/dubbo/rpc/protocol/dubbo/LazyConnectExchangeClient.java | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git
a/dubbo-rpc/dubbo-rpc-dubbo/src/main/java/org/apache/dubbo/rpc/protocol/dubbo/LazyConnectExchangeClient.java
b/dubbo-rpc/dubbo-rpc-dubbo/src/main/java/org/apache/dubbo/rpc/protocol/dubbo/LazyConnectExchangeClient.java
index 8e3babb..0faca16 100644
---
a/dubbo-rpc/dubbo-rpc-dubbo/src/main/java/org/apache/dubbo/rpc/protocol/dubbo/LazyConnectExchangeClient.java
+++
b/dubbo-rpc/dubbo-rpc-dubbo/src/main/java/org/apache/dubbo/rpc/protocol/dubbo/LazyConnectExchangeClient.java
@@ -20,6 +20,7 @@ import org.apache.dubbo.common.Parameters;
import org.apache.dubbo.common.URL;
import org.apache.dubbo.common.logger.Logger;
import org.apache.dubbo.common.logger.LoggerFactory;
+import org.apache.dubbo.common.url.component.ServiceConfigURL;
import org.apache.dubbo.common.utils.NetUtils;
import org.apache.dubbo.remoting.ChannelHandler;
import org.apache.dubbo.remoting.RemotingException;
@@ -61,7 +62,8 @@ final class LazyConnectExchangeClient implements
ExchangeClient {
public LazyConnectExchangeClient(URL url, ExchangeHandler requestHandler) {
// lazy connect, need set send.reconnect = true, to avoid channel bad
status.
- this.url = url.addParameter(SEND_RECONNECT_KEY,
Boolean.TRUE.toString());
+ this.url = new ServiceConfigURL(url.getProtocol(), url.getUsername(),
url.getPassword(), url.getHost(), url.getPort(), url.getPath(),
url.getParameters())
+ .addParameter(SEND_RECONNECT_KEY, Boolean.TRUE.toString());
this.requestHandler = requestHandler;
this.initialState = url.getParameter(LAZY_CONNECT_INITIAL_STATE_KEY,
DEFAULT_LAZY_CONNECT_INITIAL_STATE);
this.requestWithWarning =
url.getParameter(LAZY_REQUEST_WITH_WARNING_KEY,
DEFAULT_LAZY_REQUEST_WITH_WARNING);