justxuewei commented on code in PR #2246:
URL: https://github.com/apache/dubbo-go/pull/2246#discussion_r1136569665


##########
protocol/dubbo3/dubbo3_protocol.go:
##########
@@ -242,16 +242,16 @@ func (dp *DubboProtocol) openServer(url *common.URL, 
tripleCodecType tripleConst
                }
        }
 
-       if maxCall := url.GetParam(constant.MaxServerRecvMsgSize, ""); maxCall 
!= "" {
-               if size, err := strconv.Atoi(maxCall); err == nil && size != 0 {
-                       opts = append(opts, 
triConfig.WithGRPCMaxServerRecvMessageSize(size))
-               }
+       maxServerRecvMsgSize := constant.DefaultMaxServerRecvMsgSize
+       if recvMsgSize, err := 
humanize.ParseBytes(url.GetParam(constant.MaxServerRecvMsgSize, "")); err == 
nil && recvMsgSize != 0 {

Review Comment:
   Plus, `recvMsgSize` and `sendMsgSize` should be greater than 0. So the code 
should be:
   
   ```suggestion
        if recvMsgSize, err := 
humanize.ParseBytes(url.GetParam(constant.MaxServerRecvMsgSize, "")); err == 
nil && recvMsgSize > 0 {
   ```



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to