elastic / elastic/elastic-agent-client

Leaking cancel contexts.

Open
#16 3 comments 0 reactions 0 assignees View on GitHub
bug Team:Elastic-Agent v7.11.0
Dominant language
Go
Stars
5
Forks
33
Avg merge
5h 18m
Merged PRs (30d)
3

Description

The client uses WithContext to create a context for signaling shutdown to sub go-routines. This seems to make the context leak when the workers return without cancelling the context. The cancel function must be run always.

It seams the context that is generated on 'Start' is leaked at least if the Dial fails. The workaround is to call Stop always. There or other contexts that are generated via WithCancel, that look suspiciously like leaks, but I didn't check if that is the case.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.