From b8f798da3c5e9bd8fb7eec96cac97d0c39d913a1 Mon Sep 17 00:00:00 2001 From: harshit-splunk <89519921+harshit-splunk@users.noreply.github.com> Date: Mon, 18 Apr 2022 14:57:18 +0530 Subject: [PATCH] fixed error on config reload (#235) --- lib/fluent/plugin/out_splunk.rb | 4 ++++ lib/fluent/plugin/out_splunk_hec.rb | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/fluent/plugin/out_splunk.rb b/lib/fluent/plugin/out_splunk.rb index 7492613..b746c27 100644 --- a/lib/fluent/plugin/out_splunk.rb +++ b/lib/fluent/plugin/out_splunk.rb @@ -92,6 +92,10 @@ def configure(conf) end end + def shutdown + super + end + def write(chunk) log.trace { "#{self.class}: Received new chunk, size=#{chunk.read.bytesize}" } diff --git a/lib/fluent/plugin/out_splunk_hec.rb b/lib/fluent/plugin/out_splunk_hec.rb index b6eac7d..0b83128 100644 --- a/lib/fluent/plugin/out_splunk_hec.rb +++ b/lib/fluent/plugin/out_splunk_hec.rb @@ -169,8 +169,8 @@ def start end def shutdown + @conn.shutdown if not @conn.nil? super - @conn.shutdown end def format(tag, time, record)