Skip to content

Commit ce92881

Browse files
author
Paulo Gomes
committed
libgit2: remove connection caching
Connection caching was a feature created to resolve upstream issues raised from concurrent ssh connections. Some scenarios were based on multiple key exchange operations happening at the same time. This PR removes the connection caching, and instead: - Services Session.StdoutPipe() as soon as possible, as it is a known source of blocking SSH connections. - Reuse SSH connection within the same subtransport, eliminating the need for new handshakes when talking with the same server. - Simplifies the entire transport logic for better maintainability. Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
1 parent 9c1bbc4 commit ce92881

File tree

3 files changed

+63
-328
lines changed

3 files changed

+63
-328
lines changed

go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ require (
4242
github.com/prometheus/client_golang v1.12.1
4343
github.com/spf13/pflag v1.0.5
4444
golang.org/x/crypto v0.0.0-20220427172511-eb4f295cb31f
45+
golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4
4546
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c
4647
google.golang.org/api v0.77.0
4748
gotest.tools v2.2.0+incompatible
@@ -200,7 +201,6 @@ require (
200201
go.uber.org/atomic v1.7.0 // indirect
201202
go.uber.org/multierr v1.6.0 // indirect
202203
go.uber.org/zap v1.21.0 // indirect
203-
golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4 // indirect
204204
golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5 // indirect
205205
golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6 // indirect
206206
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 // indirect

0 commit comments

Comments
 (0)