From ef6e263fdeb1f11bd17a307a83c1e52c42895841 Mon Sep 17 00:00:00 2001 From: Oran Agra Date: Thu, 12 Dec 2019 17:56:02 +0200 Subject: [PATCH] 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 --- src/server.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/server.c b/src/server.c index adb7ce6be..bf1437e52 100644 --- a/src/server.c +++ b/src/server.c @@ -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'; -- GitLab