Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix infinite loop #291

Merged
merged 1 commit into from
Oct 7, 2020
Merged

fix infinite loop #291

merged 1 commit into from
Oct 7, 2020

Conversation

sorc1
Copy link
Contributor

@sorc1 sorc1 commented Sep 30, 2020

ngx_http_upsync_del_delay_delete():
conn_interval shouldn't be zero. When ngx_cycle->connection_n < 30, we have to
explicitly set it to 1.

@@ -3286,6 +3286,8 @@ ngx_http_upsync_del_delay_delete(ngx_event_t *event)

c = ngx_cycle->connections;
conn_interval = ngx_cycle->connection_n / 30;
if (!conn_interval)
Copy link
Member

@xiaokai-wang xiaokai-wang Oct 6, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if (!conn_interval) {
    conn_interval = 1;
}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

@xiaokai-wang
Copy link
Member

@sorc1 thanks.

ngx_http_upsync_del_delay_delete():
conn_interval shouldn't be zero. When ngx_cycle->connection_n < 30, we have to
explicitly set it to 1.
@sorc1 sorc1 force-pushed the fix-infinite-loop branch from ba8f2ec to 0838ce1 Compare October 6, 2020 14:32
@xiaokai-wang xiaokai-wang merged commit 63733af into weibocom:master Oct 7, 2020
@sorc1 sorc1 deleted the fix-infinite-loop branch March 10, 2022 14:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants