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:
authorJacob Vosmaer <jacob@gitlab.com>2022-04-22 16:15:34 +0300
committerJacob Vosmaer <jacob@gitlab.com>2022-04-22 16:15:34 +0300
commit6b1ebb87c1d96ddc9c998ed30344610c4558cc24 (patch)
tree67b8c6b1fea465af838c386b2a0f0fa6aceb27d8
parentc311109b15c26e1981c855bfa5c87aef02d27560 (diff)
sidechannel: lower yamux close timeoutjv-yamux-close-timeout
Lower the yamux StreamCloseTimeout setting from 5 minutes to 1 second for sidechannel connections. The motivation for changing this is to make it easier to test client side cancelation in Workhorse tests.
-rw-r--r--internal/sidechannel/sidechannel.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/internal/sidechannel/sidechannel.go b/internal/sidechannel/sidechannel.go
index 5cffe9efc..a8e7088d5 100644
--- a/internal/sidechannel/sidechannel.go
+++ b/internal/sidechannel/sidechannel.go
@@ -151,6 +151,12 @@ func NewClientHandshaker(logger *logrus.Entry, registry *Registry) client.Handsh
// waste we change this value back to 256KB which is the default and
// minimum value.
cfg.MaxStreamWindowSize = 256 * 1024
+
+ // If a client hangs up while the server is writing data to it then the
+ // server will block for 5 minutes by default before erroring out. This
+ // makes testing difficult and there is no reason to have such a long
+ // timeout in the case of sidechannels. A 1 second timeout is also OK.
+ cfg.StreamCloseTimeout = time.Second
},
)
}