Merge pull request #6662 from oranagra/fix_hz_div0

init server.hz early to avoid div by 0 during config file loading
This commit is contained in:
Salvatore Sanfilippo 2019-12-16 11:18:08 +01:00 committed by GitHub
commit 276a093753
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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';