mirror of
https://github.com/fluencelabs/redis
synced 2025-04-26 19:12:14 +00:00
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
This commit is contained in:
parent
c6fb9d0963
commit
ef6e263fde
@ -2266,6 +2266,7 @@ void createSharedObjects(void) {
|
|||||||
void initServerConfig(void) {
|
void initServerConfig(void) {
|
||||||
int j;
|
int j;
|
||||||
|
|
||||||
|
server.hz = CONFIG_DEFAULT_HZ;
|
||||||
updateCachedTime(1);
|
updateCachedTime(1);
|
||||||
getRandomHexChars(server.runid,CONFIG_RUN_ID_SIZE);
|
getRandomHexChars(server.runid,CONFIG_RUN_ID_SIZE);
|
||||||
server.runid[CONFIG_RUN_ID_SIZE] = '\0';
|
server.runid[CONFIG_RUN_ID_SIZE] = '\0';
|
||||||
|
Loading…
x
Reference in New Issue
Block a user