Skip to content

Commit

Permalink
Merge pull request #2434 from luhn/dec_ref-bug
Browse files Browse the repository at this point in the history
Fix dec_ref bug in out_forwarder plugin
  • Loading branch information
repeatedly authored Jun 3, 2019
2 parents 60e3a4c + 0bc9d16 commit 068a004
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 068a004

Please sign in to comment.