From 8ad0668612d2f48adea58c9ce1f4eff09a20266a Mon Sep 17 00:00:00 2001 From: cong Date: Fri, 5 May 2023 21:00:59 +0800 Subject: [PATCH] fix(zrpc): remove default keepalive params for NewClientWithTarget (#3208) --- zrpc/client.go | 8 -------- 1 file changed, 8 deletions(-) diff --git a/zrpc/client.go b/zrpc/client.go index 06ff3671..b0ad08a4 100644 --- a/zrpc/client.go +++ b/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...) }