Skip to content
This repository was archived by the owner on Dec 15, 2021. It is now read-only.

Commit 860d6b1

Browse files
author
Ahmed Ammar
committed
test
1 parent 2d0eab3 commit 860d6b1

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

lib/logstash/inputs/dynamodb.rb

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,6 @@ def stop
200200
event = @queue.pop()
201201
queue_event(@parser.parse_stream(event), logstash_queue, @host)
202202
end # until [email protected]?
203-
@something = true
204203
end
205204

206205
# Starts KCL app in a background thread
@@ -306,8 +305,10 @@ def stream(logstash_queue)
306305
while @something == false
307306
@logger.warn("Looping KCL thread #{@something}")
308307

309-
event = @queue.pop()
310-
queue_event(@parser.parse_stream(event), logstash_queue, @host)
308+
if (!@queue.empty?) {
309+
event = @queue.pop()
310+
queue_event(@parser.parse_stream(event), logstash_queue, @host)
311+
}
311312
end # while true
312313

313314
@logger.warn("Stopping stream...")

0 commit comments

Comments
 (0)