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 2020/09/16 16:19:30 UTC

[GitHub] [dubbo-go] georgehao opened a new pull request #760: feat: delete dubbo_protocol assert remoting.ExchangeClient

georgehao opened a new pull request #760:
URL: https://github.com/apache/dubbo-go/pull/760


   <!--  Thanks for sending a pull request! 
   -->
   
   **What this PR does**:
   1.  delete dubbo_protocol assert remoting.ExchangeClient
   2. add some comment
   **Which issue(s) this PR fixes**:
   <!--
   *Automatically closes linked issue when PR is merged.
   Usage: `Fixes #<issue number>`, or `Fixes (paste link of issue)`.
   _If PR is about `failing-tests or flakes`, please post the related issues/tests in a comment and do not use `Fixes`_*
   -->
   Fixes #
   
   **Special notes for your reviewer**:
   
   **Does this PR introduce a user-facing change?**:
   <!--
   If no, just write "NONE" in the release-note block below.
   If yes, a release note is required:
   Enter your extended release note in the block below. If the PR requires additional action from users switching to the new release, include the string "action required".
   -->
   ```release-note
   
   ```


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



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


[GitHub] [dubbo-go] watermelo commented on a change in pull request #760: feat: delete dubbo_protocol assert remoting.ExchangeClient

Posted by GitBox <gi...@apache.org>.
watermelo commented on a change in pull request #760:
URL: https://github.com/apache/dubbo-go/pull/760#discussion_r489579536



##########
File path: protocol/dubbo/dubbo_protocol.go
##########
@@ -215,16 +215,7 @@ func getExchangeClient(url common.URL) *remoting.ExchangeClient {
 	if clientTmp == nil {
 		return nil
 	}
-	exchangeClient, ok := clientTmp.(*remoting.ExchangeClient)
-	if !ok {
-		exchangeClientTmp := remoting.NewExchangeClient(url, getty.NewClient(getty.Options{
-			ConnectTimeout: config.GetConsumerConfig().ConnectTimeout,
-			RequestTimeout: config.GetConsumerConfig().RequestTimeout}), config.GetConsumerConfig().ConnectTimeout, false)
-		if exchangeClientTmp != nil {
-			exchangeClientMap.Store(url.Location, exchangeClientTmp)
-		}
-		return exchangeClientTmp
-	}
+	exchangeClient := clientTmp.(*remoting.ExchangeClient)

Review comment:
       It can return directly.




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



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


[GitHub] [dubbo-go] fangyincheng commented on a change in pull request #760: feat: delete dubbo_protocol assert remoting.ExchangeClient

Posted by GitBox <gi...@apache.org>.
fangyincheng commented on a change in pull request #760:
URL: https://github.com/apache/dubbo-go/pull/760#discussion_r489588765



##########
File path: protocol/dubbo/dubbo_protocol.go
##########
@@ -215,16 +215,7 @@ func getExchangeClient(url common.URL) *remoting.ExchangeClient {
 	if clientTmp == nil {
 		return nil
 	}
-	exchangeClient, ok := clientTmp.(*remoting.ExchangeClient)
-	if !ok {
-		exchangeClientTmp := remoting.NewExchangeClient(url, getty.NewClient(getty.Options{
-			ConnectTimeout: config.GetConsumerConfig().ConnectTimeout,
-			RequestTimeout: config.GetConsumerConfig().RequestTimeout}), config.GetConsumerConfig().ConnectTimeout, false)
-		if exchangeClientTmp != nil {
-			exchangeClientMap.Store(url.Location, exchangeClientTmp)
-		}
-		return exchangeClientTmp
-	}
+	exchangeClient := clientTmp.(*remoting.ExchangeClient)
 	return exchangeClient

Review comment:
       merge into one line?




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



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


[GitHub] [dubbo-go] AlexStocks merged pull request #760: feat: delete dubbo_protocol assert remoting.ExchangeClient

Posted by GitBox <gi...@apache.org>.
AlexStocks merged pull request #760:
URL: https://github.com/apache/dubbo-go/pull/760


   


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



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