Skip to content

Commit 087b401

Browse files
committed
Change read mode to immediately stop consuming buffered lines when quit is requested
1 parent b2dd262 commit 087b401

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

Diff for: CHANGELOG.md

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
## 4.4.6
2+
- Change read mode to immediately stop consuming buffered lines when shutdown is requested [#322](https://github.com/logstash-plugins/logstash-input-file/pull/322)
3+
14
## 4.4.5
25
- Handle EOF when checking archive validity [#321](https://github.com/logstash-plugins/logstash-input-file/pull/321)
36

Diff for: lib/filewatch/read_mode/handlers/read_file.rb

+1
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ def controlled_read(watched_file, loop_control)
5454
# sincedb position is independent from the watched_file bytes_read
5555
delta = line.bytesize + @settings.delimiter_byte_size
5656
sincedb_collection.increment(watched_file.sincedb_key, delta)
57+
break if quit?
5758
end
5859
rescue EOFError => e
5960
log_error("controlled_read: eof error reading file", watched_file, e)

Diff for: logstash-input-file.gemspec

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Gem::Specification.new do |s|
22

33
s.name = 'logstash-input-file'
4-
s.version = '4.4.5'
4+
s.version = '4.4.6'
55
s.licenses = ['Apache-2.0']
66
s.summary = "Streams events from files"
77
s.description = "This gem is a Logstash plugin required to be installed on top of the Logstash core pipeline using $LS_HOME/bin/logstash-plugin install gemname. This gem is not a stand-alone program"

0 commit comments

Comments
 (0)