Start housekeeper before services

The housekeeper needs to be initialized before services are started.
This commit is contained in:
Markus Mäkelä
2018-04-24 10:23:32 +03:00
parent a7df6b55d5
commit ce98831908
3 changed files with 17 additions and 12 deletions

View File

@ -2142,6 +2142,15 @@ int main(int argc, char **argv)
goto return_main;
}
// Start the housekeeper thread
if (!hkinit())
{
const char* logerr = "Failed to start housekeeper thread.";
print_log_n_stderr(true, true, logerr, logerr, 0);
rc = MAXSCALE_INTERNALERROR;
goto return_main;
}
/** Start all monitors */
monitorStartAll();
@ -2176,17 +2185,6 @@ int main(int argc, char **argv)
goto return_main;
}
/*
* Start the housekeeper thread
*/
if (!hkinit())
{
const char* logerr = "Failed to start housekeeper thread.";
print_log_n_stderr(true, true, logerr, logerr, 0);
rc = MAXSCALE_INTERNALERROR;
goto return_main;
}
/*<
* Start the routing workers running in their own thread.
*/