Skip to content

Commit

Permalink
Fix dec_ref bug in out_forwarder plugin.
Browse files Browse the repository at this point in the history
Fixes #2433

Signed-off-by: Theron Luhn <theron@luhn.com>
  • Loading branch information
luhn committed May 31, 2019
1 parent 71f223f commit 0bc9d16
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/fluent/plugin/out_forward.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1084,10 +1084,10 @@ def connect(host = nil)
begin
yield(sock)
rescue
@socket_cache.revoke(sock) if @keepalive
@socket_cache.revoke if @keepalive
raise
else
@socket_cache.dec_ref(sock) if @keepalive
@socket_cache.dec_ref if @keepalive
ensure
sock.close unless @keepalive
end
Expand Down

0 comments on commit 0bc9d16

Please sign in to comment.