Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libgit2: dispose connections in SubTransport.Close #775

Merged
merged 1 commit into from
Jun 9, 2022

Commits on Jun 8, 2022

  1. 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>
    Paulo Gomes committed Jun 8, 2022
    Configuration menu
    Copy the full SHA
    bfa4e38 View commit details
    Browse the repository at this point in the history