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

Close file descriptor after snapshot file was read #2710

Merged
merged 2 commits into from
Oct 18, 2021
Merged

Close file descriptor after snapshot file was read #2710

merged 2 commits into from
Oct 18, 2021

Conversation

yuri-tceretian
Copy link
Contributor

Fixes a tiny bug in the constructor of Silences. If options specify a path to snapshot file the constructor opens it and it is never closed.
The proposed change closes the file descriptor at the end of the constructor.

Signed-off-by: Yuriy Tseretyan <yuriy.tseretyan@grafana.com>
Signed-off-by: Yuriy Tseretyan <yuriy.tseretyan@grafana.com>
Copy link
Member

@gotjosh gotjosh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@roidelapluie roidelapluie merged commit 15f44f4 into prometheus:main Oct 18, 2021
@roidelapluie
Copy link
Member

thanks!

markoposavec pushed a commit to markoposavec/alertmanager that referenced this pull request Nov 4, 2021
* close file if it is opened

Signed-off-by: Yuriy Tseretyan <yuriy.tseretyan@grafana.com>
markoposavec pushed a commit to markoposavec/alertmanager that referenced this pull request Nov 4, 2021
* close file if it is opened

Signed-off-by: Yuriy Tseretyan <yuriy.tseretyan@grafana.com>
Signed-off-by: Marko Posavec <Marko.Posavec@infobip.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants