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/11/12 05:12:22 UTC

[GitHub] [dubbo-go] fangyincheng commented on a change in pull request #874: Fix: client read timeout caused by default request timeout is 0

fangyincheng commented on a change in pull request #874:
URL: https://github.com/apache/dubbo-go/pull/874#discussion_r521843511



##########
File path: protocol/dubbo/dubbo_invoker.go
##########
@@ -73,6 +73,9 @@ func NewDubboInvoker(url common.URL, client *remoting.ExchangeClient) *DubboInvo
 	if t, err := time.ParseDuration(requestTimeoutStr); err == nil {
 		requestTimeout = t
 	}
+	if requestTimeout == 0 {
+		requestTimeout = time.Second * 3

Review comment:
       url.GetParam(key, default)这个方法就可以设置默认值了




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