diff options
author | Paul Okstad <pokstad@gitlab.com> | 2019-10-16 13:48:44 +0300 |
---|---|---|
committer | Jacob Vosmaer <jacob@gitlab.com> | 2019-10-16 13:48:44 +0300 |
commit | c60aeaa85b791da42f6410902e9e3504d2e8853c (patch) | |
tree | d2a3753d4bf93d7067fb27eb6366459f4c65438d /client | |
parent | a20beb0ed2fb3247d221bdf8e3bfcdc397416377 (diff) |
Lower gRPC server inactivity ping timeout
Diffstat (limited to 'client')
-rw-r--r-- | client/dial.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/client/dial.go b/client/dial.go index 190cb7ca9..13518882e 100644 --- a/client/dial.go +++ b/client/dial.go @@ -6,6 +6,7 @@ import ( "time" "google.golang.org/grpc/credentials" + "google.golang.org/grpc/keepalive" "net/url" @@ -70,6 +71,10 @@ func Dial(rawAddress string, connOpts []grpc.DialOption) (*grpc.ClientConn, erro return net.DialTimeout("unix", path, timeout) }), + grpc.WithKeepaliveParams(keepalive.ClientParameters{ + Time: 20 * time.Second, + PermitWithoutStream: true, + }), ) } |