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(compute/metadata): init a HTTP client in OnGCE check #5439

Merged
merged 2 commits into from Feb 3, 2022

Commits on Feb 3, 2022

  1. fix(compute/metadata): init a HTTP client in OnGCE check

    Initalize a resolver and http.Client locally in function to force
    GC to cleanup background resources such as cached connections. This
    can falsely report as leaked goroutines otherwise. This kind of issue
    will still persist for calling methods like ProjectID, but we are
    intentionally caching a client and its connections for these occations
    today. If this ends up causing users issues in the fututure we can
    reevaluate at that time.
    
    Fixes: googleapis#5430
    codyoss committed Feb 3, 2022
    Copy the full SHA
    ff5443d View commit details
    Browse the repository at this point in the history
  2. Copy the full SHA
    6b036cd View commit details
    Browse the repository at this point in the history