Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitaly.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Okstad <pokstad@gitlab.com>2019-11-19 19:39:44 +0300
committerPaul Okstad <pokstad@gitlab.com>2019-11-19 19:39:44 +0300
commitff5af0057f2dfcfe39e5a41a164eca50f72d6cd2 (patch)
tree97e1c4f563821a1c117f24849459c5e505e11c1c
parent3b68223057bed9d6e6111e7882daa3d0b679c316 (diff)
parent4af5aefc6b9ebe9143f9ccbf7234fbfb7b474514 (diff)
Merge branch 'po-keepalive-fix' into 'master'
Fix client keep alive for all network types See merge request gitlab-org/gitaly!1637
-rw-r--r--changelogs/unreleased/po-keepalive-fix.yml5
-rw-r--r--client/dial.go9
2 files changed, 10 insertions, 4 deletions
diff --git a/changelogs/unreleased/po-keepalive-fix.yml b/changelogs/unreleased/po-keepalive-fix.yml
new file mode 100644
index 000000000..dec65ae6e
--- /dev/null
+++ b/changelogs/unreleased/po-keepalive-fix.yml
@@ -0,0 +1,5 @@
+---
+title: Fix client keep alive for all network types
+merge_request: 1637
+author:
+type: fixed
diff --git a/client/dial.go b/client/dial.go
index 81dea7d5b..8ab04e788 100644
--- a/client/dial.go
+++ b/client/dial.go
@@ -71,13 +71,14 @@ 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,
- }),
)
}
+ connOpts = append(connOpts, grpc.WithKeepaliveParams(keepalive.ClientParameters{
+ Time: 20 * time.Second,
+ PermitWithoutStream: true,
+ }))
+
conn, err := grpc.Dial(canonicalAddress, connOpts...)
if err != nil {
return nil, err