diff --git a/server/core/filter.cc b/server/core/filter.cc index 8073f777e..84aef5659 100644 --- a/server/core/filter.cc +++ b/server/core/filter.cc @@ -187,15 +187,7 @@ void filter_destroy(const SFilterDef& filter) void filter_destroy_instances() { Guard guard(this_unit.lock); - - for (const auto& filter : this_unit.filters) - { - // NOTE: replace this with filter_destroy - if (filter->obj->destroyInstance) - { - filter->obj->destroyInstance(filter->filter); - } - } + this_unit.filters.clear(); } const char* filter_def_get_name(const MXS_FILTER_DEF* filter_def) diff --git a/server/core/gateway.cc b/server/core/gateway.cc index 08a31b940..f68e45c35 100644 --- a/server/core/gateway.cc +++ b/server/core/gateway.cc @@ -2257,6 +2257,7 @@ int main(int argc, char** argv) * Destroy the router and filter instances of all services. */ service_destroy_instances(); + filter_destroy_instances(); RoutingWorker::finish(); maxbase::finish();