Skip to content

Commit

Permalink
Merge pull request #291 from sorc1/fix-infinite-loop
Browse files Browse the repository at this point in the history
bugfix: fix infinite loop
  • Loading branch information
xiaokai-wang authored Oct 7, 2020
2 parents e67784c + 0838ce1 commit 63733af
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/ngx_http_upsync_module.c
Original file line number Diff line number Diff line change
Expand Up @@ -3286,6 +3286,9 @@ ngx_http_upsync_del_delay_delete(ngx_event_t *event)

c = ngx_cycle->connections;
conn_interval = ngx_cycle->connection_n / 30;
if (!conn_interval) {
conn_interval = 1;
}
for (i = 0; i < ngx_cycle->connection_n; i += conn_interval) {

if (c[i].fd == (ngx_socket_t) -1) {
Expand Down

0 comments on commit 63733af

Please sign in to comment.