Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(compute/metadata): init a HTTP client in OnGCE check (#5439)
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: #5430
- Loading branch information