source-controller/pkg/git/libgit2/managed
Paulo Gomes bfa4e38b84
libgit2: dispose connections in SubTransport.Close
The average SubTransport lifecycle encompass two Actions calls. Previously,
it was attempted to share the same connection across both calls. That did
not work as some Git Servers do not support multiple sessions from the same
connection. The implementation was not fully transitioned into the
"one connection per action" model, which led to connection being leaked.

The transition to RW mutex was to avoid the unnecessary blocking in the
goroutine at the start of the second action call.

It is worth mentioning that now when the context is done,  the client level
resources (connection) will also be freed. This ensures that SSH connections
will not outlive the subtransport.

Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
2022-06-08 19:39:50 +01:00
..
const.go libgit2: refactor max length values into constants 2022-04-07 19:10:50 +01:00
http.go libgit2: Improve HTTP redirection observability 2022-06-08 09:46:28 +01:00
http_test.go libgit2: fix gitlab redirection for HTTP 2022-06-07 15:11:16 +01:00
init.go libgit2: enable managed transport by default 2022-05-24 10:46:32 +01:00
options.go libgit2: enforce context timeout 2022-05-27 13:59:50 +01:00
options_test.go Remove dependency on libgit2 credentials callback 2022-05-27 14:01:23 +05:30
ssh.go libgit2: dispose connections in SubTransport.Close 2022-06-08 19:39:50 +01:00
ssh_test.go fix panics on unmanaged http and proxy on managed http 2022-05-27 14:01:23 +05:30
transport.go libgit2: fix ssh host key verification regression 2022-06-08 13:59:32 +05:30
transport_test.go libgit2: fix ssh host key verification regression 2022-06-08 13:59:32 +05:30