MXS-2218 Centralize worker shutdown handling

This commit is contained in:
Johan Wikman
2019-01-08 14:39:26 +02:00
parent 29b6e53eb8
commit 5a698be45c
4 changed files with 24 additions and 15 deletions

View File

@ -15,6 +15,7 @@
#include <time.h>
#include <maxscale/mainworker.hh>
#include <maxscale/routingworker.hh>
#include "internal/maxscale.hh"
@ -50,6 +51,11 @@ int maxscale_shutdown()
if (n == 0)
{
if (mxs::MainWorker::created())
{
mxs::MainWorker::get().shutdown();
}
mxs::RoutingWorker::shutdown_all();
}