diff options
author | James Fargher <proglottis@gmail.com> | 2020-06-10 03:13:06 +0300 |
---|---|---|
committer | James Fargher <proglottis@gmail.com> | 2020-06-10 03:46:05 +0300 |
commit | 427877c95c0ab5e7687d8f49d2159c7df4fcfcdf (patch) | |
tree | b5e0347f5f1945107038b64aba69b0f354af6dff /client | |
parent | cdc388153a3c8d353367a96173b7460ce7dfbcde (diff) |
Allow more frequent keep-alive checking on server
Diffstat (limited to 'client')
-rw-r--r-- | client/dial.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/client/dial.go b/client/dial.go index e1a6fd12b..4fce2ac5b 100644 --- a/client/dial.go +++ b/client/dial.go @@ -74,6 +74,8 @@ func DialContext(ctx context.Context, rawAddress string, connOpts []grpc.DialOpt ) } + // grpc.KeepaliveParams must be specified at least as large as what is allowed by the + // server-side grpc.KeepaliveEnforcementPolicy connOpts = append(connOpts, grpc.WithKeepaliveParams(keepalive.ClientParameters{ Time: 20 * time.Second, PermitWithoutStream: true, |