diff --git a/server/core/config_runtime.cc b/server/core/config_runtime.cc index 8511319a4..5c99ded58 100644 --- a/server/core/config_runtime.cc +++ b/server/core/config_runtime.cc @@ -992,7 +992,7 @@ bool runtime_destroy_monitor(MXS_MONITOR *monitor) { monitorRemoveServer(monitor, monitor->monitored_servers->server); } - monitorDestroy(monitor); + monitor_deactivate(monitor); MXS_NOTICE("Destroyed monitor '%s'", monitor->name); } diff --git a/server/core/internal/monitor.h b/server/core/internal/monitor.h index 319219251..a99965aca 100644 --- a/server/core/internal/monitor.h +++ b/server/core/internal/monitor.h @@ -52,7 +52,17 @@ void monitor_free(MXS_MONITOR *); void monitorStart(MXS_MONITOR *, const MXS_CONFIG_PARAMETER*); void monitorStop(MXS_MONITOR *); -void monitorDestroy(MXS_MONITOR* monitor); + +/** + * @brief Mark monitor as deactivated + * + * A deactivated monitor appears not to exist, as if it had been + * destroyed. + * + * @param monitor + */ +void monitor_deactivate(MXS_MONITOR* monitor); + void monitorStopAll(); void monitorStartAll(); diff --git a/server/core/monitor.cc b/server/core/monitor.cc index 1816d1a26..255dfc7dc 100644 --- a/server/core/monitor.cc +++ b/server/core/monitor.cc @@ -270,7 +270,7 @@ monitorStop(MXS_MONITOR *monitor) } } -void monitorDestroy(MXS_MONITOR* monitor) +void monitor_deactivate(MXS_MONITOR* monitor) { spinlock_acquire(&monLock); monitor->active = false;