Skip to content

Commit

Permalink
Change read mode to immediately stop consuming buffered lines when qu…
Browse files Browse the repository at this point in the history
…it is requested
  • Loading branch information
edmocosta committed Dec 5, 2023
1 parent b2dd262 commit 087b401
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## 4.4.6
- Change read mode to immediately stop consuming buffered lines when shutdown is requested [#322](https://github.com/logstash-plugins/logstash-input-file/pull/322)

## 4.4.5
- Handle EOF when checking archive validity [#321](https://github.com/logstash-plugins/logstash-input-file/pull/321)

Expand Down
1 change: 1 addition & 0 deletions lib/filewatch/read_mode/handlers/read_file.rb
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ def controlled_read(watched_file, loop_control)
# sincedb position is independent from the watched_file bytes_read
delta = line.bytesize + @settings.delimiter_byte_size
sincedb_collection.increment(watched_file.sincedb_key, delta)
break if quit?
end
rescue EOFError => e
log_error("controlled_read: eof error reading file", watched_file, e)
Expand Down
2 changes: 1 addition & 1 deletion logstash-input-file.gemspec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Gem::Specification.new do |s|

s.name = 'logstash-input-file'
s.version = '4.4.5'
s.version = '4.4.6'
s.licenses = ['Apache-2.0']
s.summary = "Streams events from files"
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"
Expand Down

0 comments on commit 087b401

Please sign in to comment.