mirror of
				https://github.com/TeaOSLab/EdgeAdmin.git
				synced 2025-11-04 13:10:26 +08:00 
			
		
		
		
	调整RPC通讯的最大消息尺寸
This commit is contained in:
		@@ -309,11 +309,11 @@ func (this *RPCClient) init() error {
 | 
			
		||||
		}
 | 
			
		||||
		var conn *grpc.ClientConn
 | 
			
		||||
		if u.Scheme == "http" {
 | 
			
		||||
			conn, err = grpc.Dial(u.Host, grpc.WithInsecure())
 | 
			
		||||
			conn, err = grpc.Dial(u.Host, grpc.WithInsecure(), grpc.WithDefaultCallOptions(grpc.MaxCallRecvMsgSize(128*1024*1024)))
 | 
			
		||||
		} else if u.Scheme == "https" {
 | 
			
		||||
			conn, err = grpc.Dial(u.Host, grpc.WithTransportCredentials(credentials.NewTLS(&tls.Config{
 | 
			
		||||
				InsecureSkipVerify: true,
 | 
			
		||||
			})))
 | 
			
		||||
			})), grpc.WithDefaultCallOptions(grpc.MaxCallRecvMsgSize(128*1024*1024)))
 | 
			
		||||
		} else {
 | 
			
		||||
			return errors.New("parse endpoint failed: invalid scheme '" + u.Scheme + "'")
 | 
			
		||||
		}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user