diff --git a/server/core/gateway.cc b/server/core/gateway.cc index 7a3b14834..650e91861 100644 --- a/server/core/gateway.cc +++ b/server/core/gateway.cc @@ -2081,6 +2081,9 @@ int main(int argc, char **argv) /** Stop administrative interface */ mxs_admin_shutdown(); + /*< Stop all the monitors */ + monitorStopAll(); + /*< * Wait for the housekeeper to finish. */ @@ -2110,9 +2113,6 @@ int main(int argc, char **argv) */ thread_wait(log_flush_thr); - /*< Stop all the monitors */ - monitorStopAll(); - /*< Call finish on all modules. */ modules_process_finish();