Skip to content

Commit

Permalink
libgit2: remove connection caching
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
Paulo Gomes committed May 12, 2022
1 parent 9b832a4 commit 6d51758
Show file tree
Hide file tree
Showing 3 changed files with 64 additions and 328 deletions.
3 changes: 2 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ replace github.com/opencontainers/image-spec => github.com/opencontainers/image-
// Fix CVE-2021-43816
replace github.com/containerd/containerd => github.com/containerd/containerd v1.6.1

require golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4

require (
cloud.google.com/go v0.100.2 // indirect
cloud.google.com/go/compute v1.6.0 // indirect
Expand Down Expand Up @@ -200,7 +202,6 @@ require (
go.uber.org/atomic v1.7.0 // indirect
go.uber.org/multierr v1.6.0 // indirect
go.uber.org/zap v1.21.0 // indirect
golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4 // indirect
golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5 // indirect
golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6 // indirect
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 // indirect
Expand Down
Loading

0 comments on commit 6d51758

Please sign in to comment.