فهرست منبع

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...)
 }