浏览代码

fix(zrpc): remove default keepalive params for NewClientWithTarget (#3208)

cong 2 年之前
父节点
当前提交
8ad0668612
共有 1 个文件被更改,包括 0 次插入8 次删除
  1. 0 8
      zrpc/client.go

+ 0 - 8
zrpc/client.go

@@ -11,8 +11,6 @@ import (
 	"google.golang.org/grpc/keepalive"
 )
 
-const defaultClientKeepaliveTime = 20 * time.Second
-
 var (
 	// WithDialOption is an alias of internal.WithDialOption.
 	WithDialOption = internal.WithDialOption
@@ -95,12 +93,6 @@ func NewClientWithTarget(target string, opts ...ClientOption) (Client, error) {
 		Timeout:    true,
 	}
 
-	opts = append([]ClientOption{
-		WithDialOption(grpc.WithKeepaliveParams(keepalive.ClientParameters{
-			Time: defaultClientKeepaliveTime,
-		})),
-	}, opts...)
-
 	return internal.NewClient(target, middlewares, opts...)
 }