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

Reuse same hash object after calling purge_obsolete_socks #2635

Merged

Conversation

ganmacs
Copy link
Member

@ganmacs ganmacs commented Sep 30, 2019

since @available_sockets is initialized with
Hash.new { |obj, k| obj[k] = [] } at https://github.com/fluent/fluentd/blob/v1.7.1/lib/fluent/plugin/out_forward/socket_cache.rb#L27

Which issue(s) this PR fixes:
Fixes #2626

What this PR does / why we need it:

to avoid NoMethodError after calling purge_obsolete_socks

Docs Changes:

no need

Release Note:

same as title

@ganmacs ganmacs added the bug Something isn't working label Sep 30, 2019
@ganmacs ganmacs requested a review from repeatedly September 30, 2019 05:46
@ganmacs ganmacs force-pushed the fix-bug-available-socket-value-can-be-nil branch from 0e81244 to 20c8a10 Compare September 30, 2019 05:48
@ganmacs ganmacs self-assigned this Sep 30, 2019
Copy link
Member

@repeatedly repeatedly left a comment

Choose a reason for hiding this comment

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

Looks good.

@ganmacs ganmacs merged commit 56e7f67 into fluent:master Sep 30, 2019
@ganmacs ganmacs deleted the fix-bug-available-socket-value-can-be-nil branch September 30, 2019 08:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

out_forward unrecoverable error when upgrading from 1.6.3 to 1.7.1
2 participants