MXS-2584: Assert that workers are initialized

The initialization must always be done before a call to RoutingWorker::get
is done.
This commit is contained in:
Markus Mäkelä
2019-07-01 16:37:55 +03:00
parent b2019ea18e
commit 418a1f5210

View File

@ -446,6 +446,8 @@ bool mxs_worker_should_shutdown(MXB_WORKER* pWorker)
RoutingWorker* RoutingWorker::get(int worker_id) RoutingWorker* RoutingWorker::get(int worker_id)
{ {
mxb_assert(this_unit.initialized);
if (worker_id == MAIN) if (worker_id == MAIN)
{ {
worker_id = this_unit.id_main_worker; worker_id = this_unit.id_main_worker;