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/08/20 06:10:37 UTC

[GitHub] [dubbo-go] cityiron commented on a change in pull request #1388: Fix: fix the exception when tcp timeout is less than 1s for 1.5 #1362

cityiron commented on a change in pull request #1388:
URL: https://github.com/apache/dubbo-go/pull/1388#discussion_r692690914



##########
File path: remoting/getty/config.go
##########
@@ -179,6 +184,23 @@ func (c *GettySessionParam) CheckValidity() error {
 	return nil
 }
 
+func parseTimeDurationByRange(timeStr string, min *time.Duration, max *time.Duration) (time.Duration, error) {
+	result, err := time.ParseDuration(timeStr)
+	if err != nil {
+		return *min, err
+	}
+	if min != nil && max != nil && *min > *max { // swap

Review comment:
       The semantics of the min and max parameters are not clear,  I don't think swap is need.




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