未验证 提交 276a0937 编写于 作者: S Salvatore Sanfilippo 提交者: GitHub

Merge pull request #6662 from oranagra/fix_hz_div0

init server.hz early to avoid div by 0 during config file loading
......@@ -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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册