plugin_proxy: do not invoke exit callback if symbol is not set
@@ -70,21 +70,22 @@ static int flb_proxy_cb_exit(void *data, struct flb_config *config)
{
struct flb_output_plugin *instance = data;
struct flb_plugin_proxy *proxy = (instance->proxy);
+ struct flbgo_output_plugin *plugin;
void *inst;
inst = proxy->data;
- struct flbgo_output_plugin *plugin;
plugin = (struct flbgo_output_plugin *) inst;
-
flb_debug("[GO] running exit callback");
-
if (plugin->cb_exit_ctx) {
return plugin->cb_exit_ctx(plugin->context->remote_context);
- } else {
+ }
+ else if (plugin->cb_exit) {
return plugin->cb_exit();
}
+
+ return 0;
}
static int flb_proxy_register_output(struct flb_plugin_proxy *proxy,
