Skip to content

Commit

Permalink
Merge pull request #2 from qualtrics/master
Browse files Browse the repository at this point in the history
Fixed a bug ngx_http_upstream_fair_sched_score function.
  • Loading branch information
gnosek committed Nov 11, 2011
2 parents 2131c73 + 2b0837a commit 7171df8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ngx_http_upstream_fair_module.c
Original file line number Diff line number Diff line change
Expand Up @@ -679,7 +679,7 @@ ngx_http_upstream_fair_update_nreq(ngx_http_upstream_fair_peer_data_t *fp, int d
#define SCHED_COUNTER_BITS 20
#define SCHED_NREQ_MAX ((~0UL) >> SCHED_COUNTER_BITS)
#define SCHED_COUNTER_MAX ((1 << SCHED_COUNTER_BITS) - 1)
#define SCHED_SCORE(nreq,delta) (((nreq) << SCHED_COUNTER_BITS) | (~(delta)))
#define SCHED_SCORE(nreq,delta) (((nreq) << SCHED_COUNTER_BITS) | (~(delta) & SCHED_COUNTER_MAX))
#define ngx_upstream_fair_min(a,b) (((a) < (b)) ? (a) : (b))

static ngx_uint_t
Expand Down

0 comments on commit 7171df8

Please sign in to comment.