Merge branch '2.2' into 2.3

This commit is contained in:
Markus Mäkelä
2019-06-19 10:54:37 +03:00
5 changed files with 33 additions and 18 deletions

View File

@ -424,6 +424,7 @@ bool mxs_admin_init()
void mxs_admin_shutdown()
{
MHD_stop_daemon(http_daemon);
MXS_NOTICE("Stopped MaxScale REST API");
}
bool mxs_admin_https_enabled()

View File

@ -2255,9 +2255,6 @@ int main(int argc, char** argv)
mxb_assert(worker);
worker->run();
/** Stop administrative interface */
mxs_admin_shutdown();
/*< Stop all monitors */
monitor_stop_all();

View File

@ -19,6 +19,7 @@
#include "internal/maxscale.h"
#include "internal/service.hh"
#include "internal/admin.hh"
static time_t started;
@ -50,7 +51,12 @@ int maxscale_shutdown()
if (n == 0)
{
mxs::RoutingWorker::shutdown_all();
auto w = mxs::RoutingWorker::get(mxs::RoutingWorker::MAIN);
w->execute(
[]() {
mxs_admin_shutdown();
mxs::RoutingWorker::shutdown_all();
}, nullptr, mxs::RoutingWorker::EXECUTE_QUEUED);
}
return n + 1;