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

fix: goroutine leak with docker daemon #183

Merged
merged 4 commits into from
Jul 27, 2023

Commits on Jul 24, 2023

  1. This commit addresses a goroutine leak that occurs when continuously …

    …communicating with the Docker daemon via the Unix socket. Previously, these connections were not being properly released, leading to a growing number of goroutines over time.
    
    The solution involves modifying the http.Transport of the Docker client to disable keep-alives and set an idle connection timeout. This effectively closes idle connections, thereby preventing the goroutine leak.
    
    Changes made:
    - Added `DisableKeepAlives: true` and `IdleConnTimeout:   10 * time.Second` to the http.Transport of the Docker client.
    
    Resolves: anchore#182
    
    Signed-off-by: Aklis Chen <[email protected]>
    Signed-off-by: Alex Goodman <[email protected]>
    iAklis authored and wagoodman committed Jul 24, 2023
    Configuration menu
    Copy the full SHA
    4cf42ac View commit details
    Browse the repository at this point in the history
  2. pivot to cleanup of docker client when out of scope

    Signed-off-by: Alex Goodman <[email protected]>
    wagoodman committed Jul 24, 2023
    Configuration menu
    Copy the full SHA
    97f3237 View commit details
    Browse the repository at this point in the history

Commits on Jul 25, 2023

  1. make linter exception for long switch statement

    Signed-off-by: Alex Goodman <[email protected]>
    wagoodman committed Jul 25, 2023
    Configuration menu
    Copy the full SHA
    1a6636a View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    4868d46 View commit details
    Browse the repository at this point in the history