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> |
||
---|---|---|
.. | ||
const.go | ||
http.go | ||
http_test.go | ||
init.go | ||
options.go | ||
options_test.go | ||
ssh.go | ||
ssh_test.go | ||
transport.go | ||
transport_test.go |