Skip to content

Commit 3dc04f3

Browse files
committed
race: stop stale sweeper before iterating over factories
1 parent 4237da1 commit 3dc04f3

File tree

1 file changed

+2
-2
lines changed
  • lib/logstash/outputs

1 file changed

+2
-2
lines changed

lib/logstash/outputs/s3.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,8 @@ def close
266266

267267
@logger.debug("Uploading current workspace")
268268

269+
@file_repository.shutdown # stop stale sweeps
270+
269271
# The plugin has stopped receiving new events, but we still have
270272
# data on disk, lets make sure it get to S3.
271273
# If Logstash get interrupted, the `restore_from_crash` (when set to true) method will pickup
@@ -275,8 +277,6 @@ def close
275277
upload_file(file)
276278
end
277279

278-
@file_repository.shutdown
279-
280280
@uploader.stop # wait until all the current upload are complete
281281
@crash_uploader.stop if @restore # we might have still work to do for recovery so wait until we are done
282282
end

0 commit comments

Comments
 (0)