Commit ef6e263f authored by Oran Agra's avatar Oran Agra
Browse files

init server.hz early to avoid div by 0 during config file loading

since the refactory of config.c, it was initialized from config_hz in initServer
but apparently that's too late since the config file loading creates objects
which call LRU_CLOCK
parent c6fb9d09
......@@ -2266,6 +2266,7 @@ void createSharedObjects(void) {
void initServerConfig(void) {
int j;
server.hz = CONFIG_DEFAULT_HZ;
updateCachedTime(1);
getRandomHexChars(server.runid,CONFIG_RUN_ID_SIZE);
server.runid[CONFIG_RUN_ID_SIZE] = '\0';
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment