File tree Expand file tree Collapse file tree 1 file changed +6
-10
lines changed Expand file tree Collapse file tree 1 file changed +6
-10
lines changed Original file line number Diff line number Diff line change @@ -285,8 +285,10 @@ static int in_emitter_start_ring_buffer(struct flb_input_instance *in, struct fl
285285 return -1 ;
286286 }
287287
288- return flb_input_set_collector_time (in , in_emitter_ingest_ring_buffer ,
289- 1 , 0 , in -> config );
288+ ctx -> coll_fd = flb_input_set_collector_time (in ,
289+ in_emitter_ingest_ring_buffer ,
290+ 1 , 0 , in -> config );
291+ return (ctx -> coll_fd < 0 ) ? -1 : 0 ;
290292}
291293
292294/* Initialize plugin */
@@ -316,15 +318,9 @@ static int cb_emitter_init(struct flb_input_instance *in,
316318 return -1 ;
317319 }
318320
319- if (scheduler != config -> sched &&
320- scheduler != NULL &&
321- ctx -> ring_buffer_size == 0 ) {
322-
321+ if (in -> is_threaded == FLB_TRUE && ctx -> ring_buffer_size == 0 ) {
323322 ctx -> ring_buffer_size = DEFAULT_EMITTER_RING_BUFFER_FLUSH_FREQUENCY ;
324-
325- flb_plg_debug (in ,
326- "threaded emitter instances require ring_buffer_size"
327- " being set, using default value of %u" ,
323+ flb_plg_debug (in , "threaded: enable emitter ring buffer (size=%u)" ,
328324 ctx -> ring_buffer_size );
329325 }
330326
You can’t perform that action at this time.
0 commit comments