Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
276a0937
Unverified
Commit
276a0937
authored
Dec 16, 2019
by
Salvatore Sanfilippo
Committed by
GitHub
Dec 16, 2019
Browse files
Merge pull request #6662 from oranagra/fix_hz_div0
init server.hz early to avoid div by 0 during config file loading
parents
ba287380
ef6e263f
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/server.c
View file @
276a0937
...
@@ -2266,6 +2266,7 @@ void createSharedObjects(void) {
...
@@ -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';
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment