client: drop keepalive options #32
1 changed files with 2 additions and 7 deletions
|
@ -6,7 +6,6 @@ import (
|
||||||
|
|
||||||
"google.golang.org/grpc"
|
"google.golang.org/grpc"
|
||||||
"google.golang.org/grpc/credentials/insecure"
|
"google.golang.org/grpc/credentials/insecure"
|
||||||
"google.golang.org/grpc/keepalive"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
@ -30,9 +29,8 @@ type cfg struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
const (
|
const (
|
||||||
defaultDialTimeout = 5 * time.Second
|
defaultDialTimeout = 5 * time.Second
|
||||||
defaultKeepAliveTimeout = 5 * time.Second
|
defaultRWTimeout = 1 * time.Minute
|
||||||
defaultRWTimeout = 1 * time.Minute
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func (c *cfg) initDefault() {
|
func (c *cfg) initDefault() {
|
||||||
|
@ -41,9 +39,6 @@ func (c *cfg) initDefault() {
|
||||||
c.grpcDialOpts = []grpc.DialOption{
|
c.grpcDialOpts = []grpc.DialOption{
|
||||||
grpc.WithBlock(),
|
grpc.WithBlock(),
|
||||||
grpc.WithTransportCredentials(insecure.NewCredentials()),
|
grpc.WithTransportCredentials(insecure.NewCredentials()),
|
||||||
grpc.WithKeepaliveParams(keepalive.ClientParameters{
|
|
||||||
Timeout: defaultKeepAliveTimeout,
|
|
||||||
}),
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue