MXS-2547: Do shutdown on main worker

By stopping the REST API before the workers and moving the shutdown to the
same worker that handles REST API requests, we prevent the hang on
shutdown. This also makes the signal handler signal-safe.
This commit is contained in:
Markus Mäkelä
2019-06-18 11:23:14 +03:00
parent 69b3879357
commit 27fb397041
2 changed files with 16 additions and 7 deletions

View File

@ -410,6 +410,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()