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

[Ingest Manager] Prevent closing closed reader #20214

Merged
merged 2 commits into from
Jul 23, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions x-pack/elastic-agent/CHANGELOG.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
- Unzip failures on Windows 8/Windows server 2012 {pull}20088[20088]
- Fix failing unit tests on windows {pull}20127[20127]
- Improve GRPC stop to be more relaxed {pull}20118[20118]
- Prevent closing closed reader {pull}20214[20214]

==== New features

Expand Down
8 changes: 0 additions & 8 deletions x-pack/elastic-agent/pkg/agent/application/info/agent_id.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,6 @@ func getInfoFromStore(s ioStore) (*persistentAgentInfo, error) {
errors.M(errors.MetaKeyPath, agentConfigFile))
}

if err := reader.Close(); err != nil {
return nil, err
}

configMap, err := cfg.ToMapStr()
if err != nil {
return nil, errors.New(err,
Expand Down Expand Up @@ -137,10 +133,6 @@ func updateAgentInfo(s ioStore, agentInfo *persistentAgentInfo) error {
errors.M(errors.MetaKeyPath, agentConfigFile))
}

if err := reader.Close(); err != nil {
return err
}

configMap := make(map[string]interface{})
if err := cfg.Unpack(&configMap); err != nil {
return errors.New(err, "failed to unpack stored config to map")
Expand Down