Skip to content

Commit 30801f3

Browse files
ewolinetzerrm
authored andcommitted
Explicitly closing journal on rotate
1 parent b0a8f85 commit 30801f3

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

fluent-plugin-systemd.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,5 @@ Gem::Specification.new do |spec|
2222
spec.add_development_dependency "test-unit", "~> 2.5"
2323

2424
spec.add_runtime_dependency "fluentd", "~> 0.12"
25-
spec.add_runtime_dependency "systemd-journal", "~> 1.2"
25+
spec.add_runtime_dependency "systemd-journal", "~> 1.3"
2626
end

lib/fluent/plugin/in_systemd.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ def shutdown
3535
private
3636

3737
def init_journal
38+
@journal.close if @journal # rubocop:disable Style/SafeNavigation
3839
@journal = Systemd::Journal.new(path: @path)
3940
# make sure initial call to wait doesn't return :invalidate
4041
# see https://github.com/ledbettj/systemd-journal/issues/70

0 commit comments

Comments
 (0)