output: register new flag FLB_OUTPUT_NO_MULTIPLEX and link coroutines to instance
#define FLB_OUTPUT_NET 32 /* output address may set host and port */
#define FLB_OUTPUT_PLUGIN_CORE 0
#define FLB_OUTPUT_PLUGIN_PROXY 1
+#define FLB_OUTPUT_NO_MULTIPLEX 512
/*
* Tests callbacks
@@ -319,7 +320,9 @@ struct flb_output_thread {
struct flb_config *config; /* FLB context */
struct flb_output_instance *o_ins; /* output instance */
struct flb_thread *parent; /* parent thread addr */
- struct mk_list _head; /* Link to struct flb_task->threads */
+ struct mk_list _head_output; /* Link to flb_output_instance->th_queue */
+ struct mk_list _head; /* Link to flb_task->threads */
+
};
static FLB_INLINE
@@ -348,6 +351,7 @@ static FLB_INLINE int flb_output_thread_destroy_id(int id, struct flb_task *task
return -1;
}
+ mk_list_del(&out_th->_head_output);
mk_list_del(&out_th->_head);
thread = out_th->parent;
@@ -367,6 +371,7 @@ static FLB_INLINE void cb_output_thread_destroy(void *data)
flb_debug("[out thread] cb_destroy thread_id=%i", out_th->id);
out_th->task->users--;
+ mk_list_del(&out_th->_head_output);
mk_list_del(&out_th->_head);
}
@@ -511,6 +516,8 @@ struct flb_thread *flb_output_thread(struct flb_task *task,
((char *)th->callee) + stack_size);
#endif
+ mk_list_add(&out_th->_head_output, &o_ins->th_queue);
+
/* Workaround for makecontext() */
output_params_set(th,
buf,
