Fix filter destruction
The filter instances weren't cleared before the dynamically loaded libraries were unloaded which caused a crash.
This commit is contained in:
parent
6d82de811f
commit
f17dfdbc2b
@ -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)
|
||||
|
@ -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();
|
||||
|
Loading…
x
Reference in New Issue
Block a user